Skip to content
Snippets Groups Projects

Fix brittle test that causes build timeouts #95

Merged Martin Lowe requested to merge github/fork/autumnfound/malowe/master/95 into dev
2 files
+ 15
10
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 2
2
@@ -25,14 +25,14 @@ module.exports = class EclipseAPI {
@@ -25,14 +25,14 @@ module.exports = class EclipseAPI {
}
}
}
}
async eclipseAPI() {
async eclipseAPI(paginate = true) {
var hasMore = true;
var hasMore = true;
var result = [];
var result = [];
var data = [];
var data = [];
// add timestamp to url to avoid browser caching
// add timestamp to url to avoid browser caching
var url = 'https://projects.eclipse.org/api/projects';
var url = 'https://projects.eclipse.org/api/projects';
// loop through all available users, and add them to a list to be returned
// loop through all available users, and add them to a list to be returned
while (hasMore) {
while (hasMore && paginate) {
console.log('Loading next page...');
console.log('Loading next page...');
// get the current page of results, incrementing page count after call
// get the current page of results, incrementing page count after call
result = await axios.get(url).then(r => {
result = await axios.get(url).then(r => {
Loading