Skip to content

Commit e4fcbe8

Browse files
committed
ISSUE-1919 Fixed: Domain client event handlers no longer disappear
Signed-off-by: man85 <man85@yandex.ru>
1 parent 9cc0d92 commit e4fcbe8

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

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

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ void featureProviderTrackIsCalled() throws Exception {
123123
}
124124

125125
@Test
126-
@DisplayName("Domainless provider initialized after domain provider - OnConfigurationChanged handlers are invoked for both providers after emitting PROVIDER_CONFIGURATION_CHANGED")
126+
@DisplayName(
127+
"Domainless provider initialized after domain provider - OnConfigurationChanged handlers are invoked for both providers after emitting PROVIDER_CONFIGURATION_CHANGED")
127128
void onConfigurationChangedAreCalledForDomainlessAndDomainProviders() throws InterruptedException {
128129
EventProvider domainlessFeatureProvider = spy(EventProvider.class);
129130
EventProvider featureProvider = spy(EventProvider.class);
@@ -134,12 +135,8 @@ void onConfigurationChangedAreCalledForDomainlessAndDomainProviders() throws Int
134135
CountDownLatch domainlessLatch = new CountDownLatch(1);
135136
CountDownLatch latch = new CountDownLatch(1);
136137

137-
domainlessClient.onProviderConfigurationChanged(
138-
eventDetails -> domainlessLatch.countDown()
139-
);
140-
client.onProviderConfigurationChanged(
141-
eventDetails -> latch.countDown()
142-
);
138+
domainlessClient.onProviderConfigurationChanged(eventDetails -> domainlessLatch.countDown());
139+
client.onProviderConfigurationChanged(eventDetails -> latch.countDown());
143140

144141
api.setProviderAndWait("domain", featureProvider);
145142
api.setProviderAndWait(domainlessFeatureProvider);
@@ -150,13 +147,9 @@ void onConfigurationChangedAreCalledForDomainlessAndDomainProviders() throws Int
150147
boolean domainlessCompleted = domainlessLatch.await(5, TimeUnit.SECONDS);
151148
assertTrue(
152149
domainlessCompleted,
153-
"onProviderConfigurationChanged was not be invoked for a client with default domain"
154-
);
150+
"onProviderConfigurationChanged was not be invoked for a client with default domain");
155151

156152
boolean completed = latch.await(5, TimeUnit.SECONDS);
157-
assertTrue(
158-
completed,
159-
"onProviderConfigurationChanged was not be invoked for a client with domain 'domain'"
160-
);
153+
assertTrue(completed, "onProviderConfigurationChanged was not be invoked for a client with domain 'domain'");
161154
}
162155
}

0 commit comments

Comments
 (0)