From c9ad41d7fe3617d8fa32c5a8a07233ad96d1e32c Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 19 Jan 2015 12:29:59 +0100 Subject: [PATCH] test fix attempt --- js/common/tests/shell-figures-noncluster.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/js/common/tests/shell-figures-noncluster.js b/js/common/tests/shell-figures-noncluster.js index d09de56a18..fac1ef4708 100644 --- a/js/common/tests/shell-figures-noncluster.js +++ b/js/common/tests/shell-figures-noncluster.js @@ -74,7 +74,15 @@ function FiguresSuite () { var d1 = c1.save({ hello : 1 }); internal.wal.flush(true, true); - f = c1.figures(); + + var tries = 0; + while (++tries < 20) { + f = c1.figures(); + if (f.alive.count === 1) { + break; + } + internal.wait(1, false); + } assertEqual(0, f.datafiles.count); assertEqual(0, f.datafiles.fileSize); @@ -148,6 +156,7 @@ function FiguresSuite () { db._drop(collection); }, + //////////////////////////////////////////////////////////////////////////////// /// @brief check figures //////////////////////////////////////////////////////////////////////////////// @@ -155,7 +164,7 @@ function FiguresSuite () { testFiguresAfterOperations : function () { var cnName = "example"; - db._drop(collection); + db._drop(cnName); var collection = db._create(cnName); collection.load();