summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorvrachev <vlad.rachev@mongodb.com>2020-03-20 16:29:35 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-08 21:10:39 +0000
commitf79261579283f48d186925e7e9450917a8622e5c (patch)
tree1950c607b575ae48f51238feb7d088b3d21a5d87 /jstests
parent2f9f301e0247b059ba652c2488a450f1fbd1d77b (diff)
downloadmongo-f79261579283f48d186925e7e9450917a8622e5c.tar.gz
SERVER-46827 Resmoke end2end tests for timeouts and archival
Diffstat (limited to 'jstests')
-rw-r--r--jstests/resmoke_selftest/end2end/failure/fixture/failure0.js5
-rw-r--r--jstests/resmoke_selftest/end2end/failure/noPassthrough/failure1.js9
-rw-r--r--jstests/resmoke_selftest/end2end/timeout/fixture/timeout0.js9
-rw-r--r--jstests/resmoke_selftest/end2end/timeout/noPassthrough/timeout1.js13
4 files changed, 36 insertions, 0 deletions
diff --git a/jstests/resmoke_selftest/end2end/failure/fixture/failure0.js b/jstests/resmoke_selftest/end2end/failure/fixture/failure0.js
new file mode 100644
index 00000000000..1ec0d85529e
--- /dev/null
+++ b/jstests/resmoke_selftest/end2end/failure/fixture/failure0.js
@@ -0,0 +1,5 @@
+(function() {
+'use strict';
+
+throw new Error("Explicitly forcing the JS test to fail.");
+})();
diff --git a/jstests/resmoke_selftest/end2end/failure/noPassthrough/failure1.js b/jstests/resmoke_selftest/end2end/failure/noPassthrough/failure1.js
new file mode 100644
index 00000000000..156dab15223
--- /dev/null
+++ b/jstests/resmoke_selftest/end2end/failure/noPassthrough/failure1.js
@@ -0,0 +1,9 @@
+(function() {
+'use strict';
+
+const rst = new ReplSetTest({nodes: 2});
+rst.startSet();
+rst.initiate();
+
+throw new Error("Explicitly forcing the JS test to fail.");
+})();
diff --git a/jstests/resmoke_selftest/end2end/timeout/fixture/timeout0.js b/jstests/resmoke_selftest/end2end/timeout/fixture/timeout0.js
new file mode 100644
index 00000000000..27e87f1e47e
--- /dev/null
+++ b/jstests/resmoke_selftest/end2end/timeout/fixture/timeout0.js
@@ -0,0 +1,9 @@
+(function() {
+'use strict';
+
+// Loop infinitely to simulate timeout.
+while (true) {
+ print('looping...');
+ sleep(100);
+}
+})();
diff --git a/jstests/resmoke_selftest/end2end/timeout/noPassthrough/timeout1.js b/jstests/resmoke_selftest/end2end/timeout/noPassthrough/timeout1.js
new file mode 100644
index 00000000000..ed312ef473c
--- /dev/null
+++ b/jstests/resmoke_selftest/end2end/timeout/noPassthrough/timeout1.js
@@ -0,0 +1,13 @@
+(function() {
+'use strict';
+
+const rst = new ReplSetTest({nodes: 2});
+rst.startSet();
+rst.initiate();
+
+// Loop infinitely to simulate timeout.
+while (true) {
+ print('looping...');
+ sleep(100);
+}
+})();