Skip to content

Commit 92a7729

Browse files
committed
fixup: toxic down and upstream
Signed-off-by: Todd Baert <[email protected]>
1 parent 5f5c630 commit 92a7729

File tree

1 file changed

+7
-4
lines changed
  • providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/steps

1 file changed

+7
-4
lines changed

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/steps/ProviderSteps.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,19 @@ public void setupProvider(String providerType) throws IOException {
204204
public void the_connection_is_lost_for(int seconds) throws InterruptedException, IOException {
205205
log.info("Timeout and wait for {} seconds", seconds);
206206
String randomizer = RandomStringUtils.randomAlphanumeric(5);
207-
String timoutName = "restart" + randomizer;
207+
String timeoutUpName = "restart-up-" + randomizer;
208+
String timeoutDownName = "restart-down-" + randomizer;
208209
Proxy proxy = toxiproxyClient.getProxy(generateProxyName(State.resolverType, state.providerType));
209-
proxy.toxics().timeout(timoutName, ToxicDirection.UPSTREAM, seconds);
210+
proxy.toxics().timeout(timeoutDownName, ToxicDirection.DOWNSTREAM, seconds);
211+
proxy.toxics().timeout(timeoutUpName, ToxicDirection.UPSTREAM, seconds);
210212

211213
TimerTask task = new TimerTask() {
212214
public void run() {
213215
try {
214-
proxy.toxics().get(timoutName).remove();
216+
proxy.toxics().get(timeoutUpName).remove();
217+
proxy.toxics().get(timeoutDownName).remove();
215218
} catch (IOException e) {
216-
log.debug("Failed to remove timout", e);
219+
log.debug("Failed to remove timeout", e);
217220
}
218221
}
219222
};

0 commit comments

Comments
 (0)