8000 Made test tolerate FS latency (#10733) · nginxpre/arangodb@d596d28 · GitHub
[go: up one dir, main page]

Skip to content

Commit d596d28

Browse files
Dronplanegnusi
authored andcommitted
Made test tolerate FS latency (arangodb#10733)
1 parent 606065b commit d596d28

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

tests/js/server/aql/aql-view-arangosearch-server.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,21 @@ function iResearchFeatureAqlServerSideTestSuite () {
395395
// on Single server we could also check fs (on cluster we are on
396396
// coordinator, so nothing to do)
397397
// no new arangosearch folders should be present
398-
let afterLinkCount = getLinksCount();
399-
assertEqual(beforeLinkCount, afterLinkCount);
398+
// due to race conditions in FS (on MACs specifically)
399+
// we will do several attempts
400+
let tryCount = 3;
401+
while (tryCount > 0) {
402+
let afterLinkCount = getLinksCount();
403+
if (afterLinkCount === beforeLinkCount) {
404+
break; // all is ok.
405+
}
406+
if (tryCount > 0) {
407+
tryCount--;
408+
require('internal').sleep(5);
409+
} else {
410+
assertEqual(beforeLinkCount, afterLinkCount);
411+
}
412+
}
400413
} finally {
401414
db._drop(docsCollectionName);
402415
db._dropView(docsViewName);

0 commit comments

Comments
 (0)
0