Mercurial > hg > release > thermostat-1.2
changeset 1566:cc2c360fe1ec
Correct bad assumption trust manager test
reviewed-by: omajid
review-thread: http://icedtea.classpath.org/pipermail/thermostat/2014-November/011724.html
Test assumed that JDK is configured with a non-zero number of
trusted cert issuers. This may not always be true, so tweaked
test accordingly.
author | Jon VanAlten <jon.vanalten@redhat.com> |
---|---|
date | Tue, 25 Nov 2014 14:41:25 -0700 |
parents | aea807833d5f |
children | 8ca9a3d0f6b7 |
files | common/core/src/test/java/com/redhat/thermostat/common/internal/CustomX509TrustManagerTest.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/common/core/src/test/java/com/redhat/thermostat/common/internal/CustomX509TrustManagerTest.java Mon Nov 24 13:12:49 2014 -0500 +++ b/common/core/src/test/java/com/redhat/thermostat/common/internal/CustomX509TrustManagerTest.java Tue Nov 25 14:41:25 2014 -0700 @@ -37,7 +37,7 @@ package com.redhat.thermostat.common.internal; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; @@ -114,8 +114,8 @@ File emptyKeyStore = new File(this.getClass() .getResource("/empty.keystore").getFile()); X509TrustManager tm = new CustomX509TrustManager(emptyKeyStore, null); - // Default list should not be empty - assertTrue(tm.getAcceptedIssuers().length > 0); + // Default list should not be null + assertNotNull(tm.getAcceptedIssuers()); try { tm.checkClientTrusted(null, null); } catch (Exception e) {