summaryrefslogtreecommitdiff
path: root/jstests/gle/sync4.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-04-25 14:04:36 -0400
committerRandolph Tan <randolph@10gen.com>2014-05-06 16:32:44 -0400
commit87dc3ae516e1d12a632dc604710661e38ed7b3dd (patch)
tree3a483a3d0c38ce00a7f4d7dba0e9cba7f7eba5f3 /jstests/gle/sync4.js
parent6b945ec15c61f6bd4bfbaf382624d886ec8441d2 (diff)
downloadmongo-87dc3ae516e1d12a632dc604710661e38ed7b3dd.tar.gz
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/gle/sync4.js')
-rw-r--r--jstests/gle/sync4.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/jstests/gle/sync4.js b/jstests/gle/sync4.js
new file mode 100644
index 00000000000..b6b1a777856
--- /dev/null
+++ b/jstests/gle/sync4.js
@@ -0,0 +1,26 @@
+// TODO: remove test after we deprecate SyncClusterConnection
+
+test = new SyncCCTest( "sync4" )
+
+if (test.conn.writeMode() == 'commands') {
+ jsTest.log('Skipping test not compatible with write commands');
+}
+else {
+
+ db = test.conn.getDB( "test" )
+ t = db.sync4
+
+ for ( i=0; i<1000; i++ ){
+ t.insert( { _id : i , x : "asdasdsdasdas" } )
+ }
+ db.getLastError();
+
+ test.checkHashes( "test" , "A0" );
+ assert.eq( 1000 , t.find().count() , "A1" )
+ assert.eq( 1000 , t.find().itcount() , "A2" )
+ assert.eq( 1000 , t.find().snapshot().batchSize(10).itcount() , "A2" )
+
+ test.stop();
+
+}
+