Skip to content

Commit 1fcb3b5

Browse files
author
Bernd Warmuth
committed
fix: don't emit change event when ready
Signed-off-by: Bernd Warmuth <[email protected]>
1 parent 38f8e89 commit 1fcb3b5

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/grpc/EventStreamObserver.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ private void handleConfigurationChangeEvent(EventStreamResponse value) {
115115
* Handles provider readiness events by clearing the cache (if enabled) and notifying listeners of readiness.
116116
*/
117117
private void handleProviderReadyEvent() {
118-
this.onConnectionEvent.accept(true, Collections.emptyList()); // TODO: check if this is needed
119118
if (this.cache.getEnabled().equals(Boolean.TRUE)) {
120119
this.cache.clear();
121120
}

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/resolver/grpc/EventStreamObserverTest.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ public void change() {
5656
verify(cache, atLeast(1)).clear();
5757
}
5858

59-
@Test
60-
public void ready() {
61-
EventStreamResponse resp = mock(EventStreamResponse.class);
62-
when(resp.getType()).thenReturn("provider_ready");
63-
stream.onNext(resp);
64-
// we notify that we are ready
65-
assertEquals(1, states.size());
66-
assertTrue(states.get(0));
67-
// cache was cleaned
68-
verify(cache, atLeast(1)).clear();
69-
}
70-
7159
@Test
7260
public void cacheBustingForKnownKeys() {
7361
final String key1 = "myKey1";

0 commit comments

Comments
 (0)