Skip to content

Commit 822475c

Browse files
author
Brian Chen
committed
lint
1 parent 2d9b4d4 commit 822475c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/TransactionTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -639,14 +639,15 @@ public void testMakesDefaultMaxAttempts() {
639639
DocumentReference doc1 = firestore.collection("counters").document();
640640
AtomicInteger count = new AtomicInteger(0);
641641
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+
});
650651

651652
Exception e = waitForException(transactionTask);
652653
assertEquals(Code.FAILED_PRECONDITION, ((FirebaseFirestoreException) e).getCode());

0 commit comments

Comments
 (0)