File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/steps Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 22
33import static io .restassured .RestAssured .when ;
44import static org .assertj .core .api .Assertions .assertThat ;
5+ import static org .awaitility .Awaitility .await ;
56
67import dev .openfeature .contrib .providers .flagd .Config ;
78import dev .openfeature .contrib .providers .flagd .FlagdOptions ;
2324import java .nio .file .Path ;
2425import java .nio .file .Paths ;
2526import java .time .Duration ;
27+ import java .util .concurrent .TimeUnit ;
2628import lombok .extern .slf4j .Slf4j ;
2729import org .apache .commons .io .FileUtils ;
2830import org .apache .commons .lang3 .RandomStringUtils ;
@@ -200,6 +202,9 @@ public void the_flag_was_modded() {
200202
201203 @ Then ("the client should be in {} state" )
202204 public void the_client_should_be_in_fatal_state (String clientState ) {
203- assertThat (state .client .getProviderState ()).isEqualTo (ProviderState .valueOf (clientState .toUpperCase ()));
205+ await ().pollDelay (100 , TimeUnit .MILLISECONDS )
206+ .atMost (1000 , TimeUnit .MILLISECONDS )
207+ .untilAsserted (() -> assertThat (state .client .getProviderState ())
208+ .isEqualTo (ProviderState .valueOf (clientState .toUpperCase ())));
204209 }
205210}
You can’t perform that action at this time.
0 commit comments