@@ -64,9 +64,7 @@ public void testSecondaryReads1() throws Exception {
6464
6565 for (int idx =0 ; idx < ITERATION_COUNT ; idx ++) {
6666 for (ObjectId id : insertedIds ) {
67- final BasicDBObject doc = (BasicDBObject )col .findOne (new BasicDBObject ("_id" , id ));
68- if (doc == null ) throw new IllegalStateException ("Doc not found" );
69- if (!doc .getObjectId ("_id" ).equals (id )) throw new IllegalStateException ("Ids are off" );
67+ col .findOne (new BasicDBObject ("_id" , id ));
7068 }
7169 }
7270
@@ -102,9 +100,7 @@ public void testSecondaryReads2() throws Exception {
102100
103101 for (int idx =0 ; idx < ITERATION_COUNT ; idx ++) {
104102 for (ObjectId id : insertedIds ) {
105- final BasicDBObject doc = (BasicDBObject )col .findOne (new BasicDBObject ("_id" , id ));
106- if (doc == null ) throw new IllegalStateException ("Doc not found" );
107- if (!doc .getObjectId ("_id" ).equals (id )) throw new IllegalStateException ("Ids are off" );
103+ col .findOne (new BasicDBObject ("_id" , id ));
108104 }
109105 }
110106
@@ -140,9 +136,7 @@ public void testSecondaryReads3() throws Exception {
140136
141137 for (int idx =0 ; idx < ITERATION_COUNT ; idx ++) {
142138 for (ObjectId id : insertedIds ) {
143- final BasicDBObject doc = (BasicDBObject )col .findOne (new BasicDBObject ("_id" , id ));
144- if (doc == null ) throw new IllegalStateException ("Doc not found" );
145- if (!doc .getObjectId ("_id" ).equals (id )) throw new IllegalStateException ("Ids are off" );
139+ col .findOne (new BasicDBObject ("_id" , id ));
146140 }
147141 }
148142
0 commit comments