From 194e0421e5d420f4c2792d4def3a25b3fef20a0c Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 20 Aug 2024 13:49:39 -0700 Subject: [PATCH] Add logging to tests --- .../Firebase/Sample/Firestore/UIHandlerAutomated.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs b/firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs index 0b390f95..75c1cefd 100644 --- a/firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs +++ b/firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs @@ -4680,6 +4680,17 @@ private void AssertQueryResults(string desc, Query query, List docIds) { private void AssertQueryResults(string desc, Query query, List docIds, long count) { var snapshot = Await(query.GetSnapshotAsync()); + if (docIds.Count != count) { + UnityEngine.Debug.Log("=-=-= WTF!!!"); + } + + if (snapshot.Count != docIds.Count) { + UnityEngine.Debug.Log("===== Got a snapshot for " + desc + ". Count: " + snapshot.Count + " expected: " + count); + for (int i = 0; i < snapshot.Count; i++) { + UnityEngine.Debug.Log("===== snapshot[" + i + "]: " + snapshot[i].Id); + } + } + AssertEq(desc + ": Query result count", snapshot.Count, docIds.Count); for (int i = 0; i < snapshot.Count; i++) { AssertEq(desc + ": Document ID " + i, docIds[i], snapshot[i].Id);