@@ -153,7 +153,7 @@ public void testSetup() throws Exception {
153153 Assertions .assertEquals (OperationStatus .SUCCESS , db .put (null , key , value ));
154154
155155 DatabaseEntry readValue = new DatabaseEntry ();
156- Assertions .assertEquals (OperationStatus .SUCCESS , db .get (null , key , readValue , LockMode .READ_COMMITTED ));
156+ Assertions .assertEquals (OperationStatus .SUCCESS , db .get (null , key , readValue , LockMode .DEFAULT ));
157157 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
158158
159159 // Remove database
@@ -174,7 +174,7 @@ public void testSetup() throws Exception {
174174 Database epochDb = bdbEnvironment .getEpochDB ();
175175 Assertions .assertEquals (OperationStatus .SUCCESS , epochDb .put (null , key , value ));
176176 DatabaseEntry readValue2 = new DatabaseEntry ();
177- Assertions .assertEquals (OperationStatus .SUCCESS , epochDb .get (null , key , readValue2 , LockMode .READ_COMMITTED ));
177+ Assertions .assertEquals (OperationStatus .SUCCESS , epochDb .get (null , key , readValue2 , LockMode .DEFAULT ));
178178 Assertions .assertEquals (new String (value .getData ()), new String (readValue2 .getData ()));
179179
180180 new MockUp <Env >() {
@@ -244,7 +244,7 @@ public void testMetadataRecovery() throws Exception {
244244 Assertions .assertEquals (OperationStatus .SUCCESS , db .put (null , key , value ));
245245
246246 DatabaseEntry readValue = new DatabaseEntry ();
247- Assertions .assertEquals (OperationStatus .SUCCESS , db .get (null , key , readValue , LockMode .READ_COMMITTED ));
247+ Assertions .assertEquals (OperationStatus .SUCCESS , db .get (null , key , readValue , LockMode .DEFAULT ));
248248 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
249249 bdbEnvironment .close ();
250250
@@ -254,7 +254,7 @@ public void testMetadataRecovery() throws Exception {
254254 Database db2 = bdbEnvironment2 .openDatabase (dbName );
255255
256256 DatabaseEntry readValue2 = new DatabaseEntry ();
257- Assertions .assertEquals (OperationStatus .SUCCESS , db2 .get (null , key , readValue2 , LockMode .READ_COMMITTED ));
257+ Assertions .assertEquals (OperationStatus .SUCCESS , db2 .get (null , key , readValue2 , LockMode .DEFAULT ));
258258 Assertions .assertEquals (new String (value .getData ()), new String (readValue2 .getData ()));
259259 bdbEnvironment2 .close ();
260260 }
@@ -278,15 +278,15 @@ public void testOpenReplicatedEnvironmentTwice() throws Exception {
278278 Assertions .assertEquals (OperationStatus .SUCCESS , db .put (null , key , value ));
279279
280280 DatabaseEntry readValue = new DatabaseEntry ();
281- Assertions .assertEquals (OperationStatus .SUCCESS , db .get (null , key , readValue , LockMode .READ_COMMITTED ));
281+ Assertions .assertEquals (OperationStatus .SUCCESS , db .get (null , key , readValue , LockMode .DEFAULT ));
282282 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
283283 bdbEnvironment .close ();
284284
285285 bdbEnvironment .openReplicatedEnvironment (homeFile );
286286 bdbEnvironment .openReplicatedEnvironment (homeFile );
287287 Database db2 = bdbEnvironment .openDatabase (dbName );
288288 DatabaseEntry readValue2 = new DatabaseEntry ();
289- Assertions .assertEquals (OperationStatus .SUCCESS , db2 .get (null , key , readValue2 , LockMode .READ_COMMITTED ));
289+ Assertions .assertEquals (OperationStatus .SUCCESS , db2 .get (null , key , readValue2 , LockMode .DEFAULT ));
290290 Assertions .assertEquals (new String (value .getData ()), new String (readValue2 .getData ()));
291291 bdbEnvironment .close ();
292292 }
@@ -324,9 +324,9 @@ public void testTruncateJournalsGreaterThan() throws Exception {
324324 Database db11AfterTruncate = bdbEnvironment .openDatabase ("11" );
325325 Assertions .assertEquals (7 , db11AfterTruncate .count ());
326326 Assertions .assertEquals (OperationStatus .NOTFOUND ,
327- db11AfterTruncate .get (null , longToEntry (18 ), new DatabaseEntry (), LockMode .READ_COMMITTED ));
327+ db11AfterTruncate .get (null , longToEntry (18 ), new DatabaseEntry (), LockMode .DEFAULT ));
328328 Assertions .assertEquals (OperationStatus .SUCCESS ,
329- db11AfterTruncate .get (null , longToEntry (17 ), new DatabaseEntry (), LockMode .READ_COMMITTED ));
329+ db11AfterTruncate .get (null , longToEntry (17 ), new DatabaseEntry (), LockMode .DEFAULT ));
330330 bdbEnvironment .close ();
331331 }
332332
@@ -405,14 +405,14 @@ public void testCluster() throws Exception {
405405 Assertions .assertEquals (1 , followerEnvironment .getDatabaseNames ().size ());
406406 Database followerDb = followerEnvironment .openDatabase (dbName );
407407 DatabaseEntry readValue = new DatabaseEntry ();
408- Assertions .assertEquals (OperationStatus .SUCCESS , followerDb .get (null , key , readValue , LockMode .READ_COMMITTED ));
408+ Assertions .assertEquals (OperationStatus .SUCCESS , followerDb .get (null , key , readValue , LockMode .DEFAULT ));
409409 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
410410 }
411411
412412 Assertions .assertEquals (1 , observerEnvironment .getDatabaseNames ().size ());
413413 Database observerDb = observerEnvironment .openDatabase (dbName );
414414 DatabaseEntry readValue = new DatabaseEntry ();
415- Assertions .assertEquals (OperationStatus .SUCCESS , observerDb .get (null , key , readValue , LockMode .READ_COMMITTED ));
415+ Assertions .assertEquals (OperationStatus .SUCCESS , observerDb .get (null , key , readValue , LockMode .DEFAULT ));
416416 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
417417
418418 observerEnvironment .close ();
@@ -519,7 +519,7 @@ public void testRollbackException() throws Exception {
519519 Assertions .assertEquals (1 , entryPair .first .getDatabaseNames ().size ());
520520 Database followerDb = entryPair .first .openDatabase (beginDbName );
521521 DatabaseEntry readValue = new DatabaseEntry ();
522- Assertions .assertEquals (OperationStatus .SUCCESS , followerDb .get (null , key , readValue , LockMode .READ_COMMITTED ));
522+ Assertions .assertEquals (OperationStatus .SUCCESS , followerDb .get (null , key , readValue , LockMode .DEFAULT ));
523523 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
524524 followerDb .close ();
525525 }
@@ -688,7 +688,7 @@ public void testReadTxnIsNotMatched() throws Exception {
688688 Assertions .assertEquals (1 , entryPair .first .getDatabaseNames ().size ());
689689 Database followerDb = entryPair .first .openDatabase (beginDbName );
690690 DatabaseEntry readValue = new DatabaseEntry ();
691- Assertions .assertEquals (OperationStatus .SUCCESS , followerDb .get (null , key , readValue , LockMode .READ_COMMITTED ));
691+ Assertions .assertEquals (OperationStatus .SUCCESS , followerDb .get (null , key , readValue , LockMode .DEFAULT ));
692692 Assertions .assertEquals (new String (value .getData ()), new String (readValue .getData ()));
693693 }
694694
@@ -737,6 +737,6 @@ public void testReadTxnIsNotMatched() throws Exception {
737737
738738 key = new DatabaseEntry (new byte []{1 , 2 , 3 });
739739 DatabaseEntry readValue = new DatabaseEntry ();
740- Assertions .assertEquals (OperationStatus .SUCCESS , masterDb .get (null , key , readValue , LockMode .READ_COMMITTED ));
740+ Assertions .assertEquals (OperationStatus .SUCCESS , masterDb .get (null , key , readValue , LockMode .DEFAULT ));
741741 }
742742}
0 commit comments