Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/test/java/io/harness/cf/client/api/CfClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ void shouldAllowEvaluationsToContinueWhenAuthFails(boolean shouldWaitForInit)
try (MockWebServer mockSvr = new MockWebServer()) {
mockSvr.setDispatcher(webserverDispatcher);
mockSvr.start();

try (CfClient client =
new CfClient(
makeConnectorWithMinimalRetryBackOff(mockSvr.getHostName(), mockSvr.getPort()),
Expand All @@ -173,6 +172,13 @@ void shouldAllowEvaluationsToContinueWhenAuthFails(boolean shouldWaitForInit)
System.out.printf(
"Test that xVariation doesn't block and serves default when auth fails, iteration #%d%n",
i);
// Add logging for visibility in case of exception
try {
client.waitForInitialization();
} catch (FeatureFlagInitializeException ex) {
System.err.println("Feature flag initialization failed: " + ex.getMessage());
}
}

boolean b1 = client.boolVariation("test", null, true);
boolean b2 =
Expand Down