Skip to content

Commit

Permalink
chore: blocking set-provider in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert committed Oct 18, 2024
1 parent 3f1cfed commit 48cd5f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void reset_logs() {
@DisplayName("should not throw exception if hook has different type argument than hookContext")
void shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext() {
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
api.setProvider("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider());
api.setProviderAndWait("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider());
Client client = api.getClient("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext");
client.addHooks(mockBooleanHook(), mockStringHook());
FlagEvaluationDetails<Boolean> actual = client.getBooleanDetails("feature key", Boolean.FALSE);
Expand Down Expand Up @@ -96,7 +96,7 @@ void shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState() {
void shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState() {
FeatureProvider provider = new TestEventsProvider(5000);
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
api.setProvider("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState", provider);
api.setProviderAndWait("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState", provider);
Client client = api.getClient("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState");
FlagEvaluationDetails<Boolean> details = client.getBooleanDetails("key", true);

Expand Down

0 comments on commit 48cd5f4

Please sign in to comment.