File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
firebase-firestore/src/androidTest/java/com/google/firebase/firestore Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -639,14 +639,15 @@ public void testMakesDefaultMaxAttempts() {
639
639
DocumentReference doc1 = firestore .collection ("counters" ).document ();
640
640
AtomicInteger count = new AtomicInteger (0 );
641
641
waitFor (doc1 .set (map ("count" , 15 )));
642
- Task <Void > transactionTask = firestore .runTransaction (
643
- transaction -> {
644
- // Get the first doc.
645
- transaction .get (doc1 );
646
- // Do a write outside of the transaction to cause the transaction to fail.
647
- waitFor (doc1 .set (map ("count" , 1234 + count .incrementAndGet ())));
648
- return null ;
649
- });
642
+ Task <Void > transactionTask =
643
+ firestore .runTransaction (
644
+ transaction -> {
645
+ // Get the first doc.
646
+ transaction .get (doc1 );
647
+ // Do a write outside of the transaction to cause the transaction to fail.
648
+ waitFor (doc1 .set (map ("count" , 1234 + count .incrementAndGet ())));
649
+ return null ;
650
+ });
650
651
651
652
Exception e = waitForException (transactionTask );
652
653
assertEquals (Code .FAILED_PRECONDITION , ((FirebaseFirestoreException ) e ).getCode ());
You can’t perform that action at this time.
0 commit comments