Skip to content

Commit 48cd5f4

Browse files
committed
chore: blocking set-provider in tests
Signed-off-by: Todd Baert <[email protected]>
1 parent 3f1cfed commit 48cd5f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void reset_logs() {
4242
@DisplayName("should not throw exception if hook has different type argument than hookContext")
4343
void shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext() {
4444
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
45-
api.setProvider("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider());
45+
api.setProviderAndWait("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider());
4646
Client client = api.getClient("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext");
4747
client.addHooks(mockBooleanHook(), mockStringHook());
4848
FlagEvaluationDetails<Boolean> actual = client.getBooleanDetails("feature key", Boolean.FALSE);
@@ -96,7 +96,7 @@ void shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState() {
9696
void shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState() {
9797
FeatureProvider provider = new TestEventsProvider(5000);
9898
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
99-
api.setProvider("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState", provider);
99+
api.setProviderAndWait("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState", provider);
100100
Client client = api.getClient("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState");
101101
FlagEvaluationDetails<Boolean> details = client.getBooleanDetails("key", true);
102102

0 commit comments

Comments
 (0)