Skip to content

Commit db31159

Browse files
committed
Add condition to skip unit test in Travis
1 parent 77b9d38 commit db31159

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/test/java/com/ibm/watson/developer_cloud/util/CredentialUtilsTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import static org.junit.Assert.assertEquals;
1616
import static org.junit.Assert.assertNull;
1717
import static org.junit.Assert.assertTrue;
18+
import static org.junit.Assume.assumeTrue;
1819

1920
import java.io.InputStream;
2021
import java.util.Hashtable;
@@ -125,10 +126,12 @@ public void testGetUserCredentialsWithPlan() {
125126
}
126127

127128
/**
128-
* Test getting the API URL using JDNI.
129+
* Test getting the API URL using JDNI. We ignore this test in Travis because
130+
* it always fails there.
129131
*/
130132
@Test
131133
public void testGetAPIUrlFromJDNI() {
134+
assumeTrue(!System.getenv().containsKey("TRAVIS"));
132135
assertEquals(CredentialUtils.getAPIUrlTest(SERVICE_NAME), PERSONALITY_INSIGHTS_URL);
133136
}
134137
}

0 commit comments

Comments
 (0)