Skip to content

Commit dbe3504

Browse files
authored
Fixing an intermittent test failure (#306)
1 parent d5b2d45 commit dbe3504

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/java/com/google/firebase/FirebaseAppTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import com.google.common.base.Suppliers;
4040
import com.google.common.collect.ImmutableList;
4141
import com.google.common.collect.ImmutableMap;
42+
import com.google.common.collect.ImmutableSet;
4243
import com.google.firebase.FirebaseApp.TokenRefresher;
4344
import com.google.firebase.FirebaseOptions.Builder;
4445
import com.google.firebase.database.FirebaseDatabase;
@@ -60,6 +61,7 @@
6061
import java.util.UUID;
6162
import java.util.concurrent.Callable;
6263
import java.util.concurrent.TimeUnit;
64+
import org.junit.AfterClass;
6365
import org.junit.Assert;
6466
import org.junit.BeforeClass;
6567
import org.junit.Rule;
@@ -83,6 +85,11 @@ public static void setupClass() throws IOException {
8385
TestUtils.getApplicationDefaultCredentials();
8486
}
8587

88+
@AfterClass
89+
public static void tearDownClass() {
90+
TestUtils.unsetEnvironmentVariables(ImmutableSet.of(FirebaseApp.FIREBASE_CONFIG_ENV_VAR));
91+
}
92+
8693
@Test(expected = NullPointerException.class)
8794
public void testNullAppName() {
8895
FirebaseApp.initializeApp(OPTIONS, null);

0 commit comments

Comments
 (0)