Skip to content

Commit 2d7b15f

Browse files
committed
Addressed comments
1 parent 15bbeda commit 2d7b15f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

firebase-database/src/androidTest/java/com/google/firebase/database/IntegrationTestHelpers.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,12 @@ public static void waitFor(Semaphore semaphore, int count, long timeout, TimeUni
334334
assertTrue("Operation timed out", success);
335335
}
336336

337-
// Note: This assumes that the key is at the root. If the key is nested, then another solution
338-
// needs to be found.
339337
public static DatabaseReference translateReference(DatabaseReference node, FirebaseDatabase db) {
340-
return db.getReference().child(node.getKey());
338+
return db.getReference().child(node.getPath().toString());
341339
}
342340

343341
public static DataSnapshot referenceAtPath(DatabaseReference node, EventRecord record) {
344-
return record.getSnapshot().child(node.getKey());
342+
return record.getSnapshot().child(node.getPath().toString());
345343
}
346344

347345
public static DataSnapshot getSnap(Query ref) throws InterruptedException {

firebase-database/src/androidTest/java/com/google/firebase/database/QueryTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4637,7 +4637,6 @@ public void testGetResolvesToCacheWhenOnlineAndParentListener()
46374637
});
46384638
readFuture.timedGet();
46394639
DataSnapshot snapshot = await(readNode.get());
4640-
;
46414640
assertEquals(val, Objects.requireNonNull(snapshot.getValue()));
46424641
} catch (TestFailure | TimeoutException | ExecutionException e) {
46434642
e.printStackTrace();

0 commit comments

Comments
 (0)