Ignore channel not found which causes flakiness due to race between lifecycle update and test ending
@@ -79,6 +79,8 @@ class IPCServicesTest {
@BeforeEach
void beforeEach(ExtensionContext context) {
ignoreExceptionWithMessage(context, "Connection reset by peer");
+ // Ignore if IPC can't send us more lifecycle updates because the test is already done.
+ ignoreExceptionUltimateCauseWithMessage(context, "Channel not found for given connection context");
}
@BeforeAll
@@ -187,7 +189,7 @@ class IPCServicesTest {
}
@Test
- void lifecycleTest(ExtensionContext context) throws Exception {
+ void lifecycleTest() throws Exception {
KernelIPCClientConfig config = getIPCConfigForService("ServiceName");
client = new IPCClientImpl(config);
LifecycleImpl c = new LifecycleImpl(client);
@@ -200,8 +202,6 @@ class IPCServicesTest {
c.listenToStateChanges("ServiceName", p.getRight());
c.reportState("ERRORED");
p.getLeft().get(500, TimeUnit.MILLISECONDS);
- // Ignore if IPC can't send us more lifecycle updates because the test is already done.
- ignoreExceptionUltimateCauseWithMessage(context, "Channel not found for given connection context");
}
@Test
