summaryrefslogtreecommitdiff
path: root/jstests/parallel/checkMultiThread.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/parallel/checkMultiThread.js')
-rw-r--r--jstests/parallel/checkMultiThread.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/jstests/parallel/checkMultiThread.js b/jstests/parallel/checkMultiThread.js
index 0332fe32e84..a6b92689bec 100644
--- a/jstests/parallel/checkMultiThread.js
+++ b/jstests/parallel/checkMultiThread.js
@@ -2,13 +2,19 @@ load('jstests/libs/parallelTester.js');
var start = new Date();
print("start: " + start);
-var func = function() { db.runCommand({$eval: "sleep(10000);", nolock: true}); return new Date();};
-a = new ScopedThread( func );
-b = new ScopedThread( func );
+var func = function() {
+ db.runCommand({$eval: "sleep(10000);", nolock: true});
+ return new Date();
+};
+a = new ScopedThread(func);
+b = new ScopedThread(func);
a.start();
b.start();
a.join();
b.join();
-assert.lt( a.returnData().getMilliseconds(), start.getMilliseconds() + 15000, "A took more than 15s" );
-assert.lt( b.returnData().getMilliseconds(), start.getMilliseconds() + 15000, "B took more than 15s" );
-
+assert.lt(a.returnData().getMilliseconds(),
+ start.getMilliseconds() + 15000,
+ "A took more than 15s");
+assert.lt(b.returnData().getMilliseconds(),
+ start.getMilliseconds() + 15000,
+ "B took more than 15s");