Skip to content

Commit 9cc165e

Browse files
author
kristina
committed
improved circular test
1 parent c138f49 commit 9cc165e

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

src/test/com/mongodb/framework/Circular.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@ public static void main(String[] args)
1414

1515
Mongo m = new Mongo( new DBAddress( "127.0.0.1:27017/driver_test_framework" ) );
1616
DBObject foo = new BasicDBObject();
17-
m.getCollection( "remove1" ).remove( foo );
17+
DBCollection b = m.getCollection( "b" );
18+
foo.put( "c", b );
19+
m.getCollection( "a" ).save( foo );
20+
21+
foo = new BasicDBObject();
22+
foo.put( "c", 1 );
23+
b.save( foo );
24+
25+
ObjectId id = new ObjectId();
26+
foo = new BasicDBObject();
27+
foo.put( "_id", id );
28+
foo.put( "that", 2 );
29+
DBRef ref = new DBRef( "c", id );
30+
foo.put( "thiz", ref );
31+
m.getCollection( "c" ).save( foo );
1832

19-
foo.put( "a", 3 );
20-
m.getCollection( "remove1" ).remove( foo );
2133
}
2234
}

src/test/com/mongodb/framework/dispatch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ elif [[ "$1" = "remove" ]]; then
1212
java com.mongodb.framework.Remove
1313
elif [[ "$1" = "capped" ]]; then
1414
java com.mongodb.framework.Capped
15-
elif [[ "$1" = "circular" ]]; then
16-
java com.mongodb.framework.Circular
15+
#elif [[ "$1" = "circular" ]]; then
16+
# java com.mongodb.framework.Circular
1717
elif [[ "$1" = "dbs" ]]; then
1818
java com.mongodb.framework.Dbs > $2
1919
#elif [[ "$1" = "admin" ]]; then

0 commit comments

Comments
 (0)