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 Original file line number Diff line number Diff line change @@ -204,16 +204,19 @@ public void setupProvider(String providerType) throws IOException {
204
204
public void the_connection_is_lost_for (int seconds ) throws InterruptedException , IOException {
205
205
log .info ("Timeout and wait for {} seconds" , seconds );
206
206
String randomizer = RandomStringUtils .randomAlphanumeric (5 );
207
- String timoutName = "restart" + randomizer ;
207
+ String timeoutUpName = "restart-up-" + randomizer ;
208
+ String timeoutDownName = "restart-down-" + randomizer ;
208
209
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 );
210
212
211
213
TimerTask task = new TimerTask () {
212
214
public void run () {
213
215
try {
214
- proxy .toxics ().get (timoutName ).remove ();
216
+ proxy .toxics ().get (timeoutUpName ).remove ();
217
+ proxy .toxics ().get (timeoutDownName ).remove ();
215
218
} catch (IOException e ) {
216
- log .debug ("Failed to remove timout " , e );
219
+ log .debug ("Failed to remove timeout " , e );
217
220
}
218
221
}
219
222
};
You can’t perform that action at this time.
0 commit comments