Skip to content

Commit 43b5084

Browse files
authored
Adjust Installations Race Condition test (#796)
* Adjust Installations Race Condition test * Add a warning log
1 parent d1b9e6d commit 43b5084

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

installations/testapp/Assets/Firebase/Sample/Installations/UIHandlerAutomated.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,13 @@ Task TestCreateDestroyRace() {
177177
var app = Firebase.FirebaseApp.DefaultInstance;
178178
installations = Firebase.Installations.FirebaseInstallations.GetInstance(app);
179179

180-
// Even though the app is destroyed, this call should not result in
181-
// any problems, other than returning a potentially faulted task.
182-
installations.GetIdAsync();
180+
try {
181+
installations.GetIdAsync();
182+
} catch (System.NullReferenceException) {
183+
// Possible NullReferenceException because installations might be still
184+
// being disposed from the previous loop, but not ideal.
185+
DebugLog("WARNING: GetIdAsync threw a NullReferenceException");
186+
}
183187

184188
app = null;
185189
installations = null;

0 commit comments

Comments
 (0)