Skip to content

Commit 01df67a

Browse files
committed
need to reset static vars in tests
1 parent 8f0076c commit 01df67a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

google-api-client/src/test/java/com/google/api/client/googleapis/GoogleUtilsTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public void testGetCertificateTrustStore_LoadsJdkDefaultFirst() throws Exception
4343
public void testGetCertificateTrustStore_LoadsBundledKeystoreIfJdkDefaultLoadFails()
4444
throws Exception {
4545
GoogleUtils.certTrustStore = null;
46+
String[] originalPaths = GoogleUtils.possibleJdkPaths;
4647
GoogleUtils.possibleJdkPaths = new String[0];
4748

4849
KeyStore trustStore = GoogleUtils.getCertificateTrustStore();
@@ -53,6 +54,8 @@ public void testGetCertificateTrustStore_LoadsBundledKeystoreIfJdkDefaultLoadFai
5354
"Certificate truststore should contain the same amount of certificates as the bundled keystore",
5455
trustStore.size(),
5556
bundled.size());
57+
58+
GoogleUtils.possibleJdkPaths = originalPaths;
5659
}
5760

5861
public void testGetCertificateTrustStore_IsCached() throws Exception {

0 commit comments

Comments
 (0)