Skip to content

Commit

Permalink
fixup: another test race condition fix
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
  • Loading branch information
toddbaert committed Jul 12, 2023
1 parent f0d716e commit be285dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/dev/openfeature/sdk/ProviderRepositoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ void shouldRunLambdasOnSuccessful() {

setFeatureProvider(featureProvider1, afterSet, afterInit, afterShutdown, afterError);
setFeatureProvider(featureProvider2);
verify(afterSet).accept(featureProvider1);
verify(afterInit).accept(featureProvider1);
verify(afterShutdown).accept(oldProvider);
verify(afterSet, timeout(TIMEOUT)).accept(featureProvider1);
verify(afterInit, timeout(TIMEOUT)).accept(featureProvider1);
verify(afterShutdown, timeout(TIMEOUT)).accept(oldProvider);
verify(afterError, never()).accept(any(), any());
}

Expand All @@ -278,7 +278,7 @@ void shouldRunLambdasOnError() throws Exception {
FeatureProvider errorFeatureProvider = createMockedErrorProvider();

setFeatureProvider(errorFeatureProvider, afterSet, afterInit, afterShutdown, afterError);
verify(afterSet).accept(errorFeatureProvider);
verify(afterSet, timeout(TIMEOUT)).accept(errorFeatureProvider);
verify(afterInit, never()).accept(any());;
verify(afterError, timeout(TIMEOUT)).accept(eq(errorFeatureProvider), any());
}
Expand Down

0 comments on commit be285dd

Please sign in to comment.