Skip to content

Commit a2bb3a2

Browse files
committed
test fix
1 parent 1fbb4ab commit a2bb3a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpHeaderThreadContextTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public void testSuccessfulSyncValidationUntamperedThreadContext() throws Excepti
7373
)
7474
);
7575
channel.pipeline().addLast(defaultContextAssertingChannelHandler(threadPool.getThreadContext()));
76+
channel.pipeline().fireChannelRegistered();
7677
// send first request through
7778
sendRequestThrough(isValidationSuccessful.get(), null);
7879
// send second request through, to check in case the context got stained by the first one through
@@ -93,6 +94,7 @@ public void testFailedSyncValidationUntamperedThreadContext() throws Exception {
9394
)
9495
);
9596
channel.pipeline().addLast(defaultContextAssertingChannelHandler(threadPool.getThreadContext()));
97+
channel.pipeline().fireChannelRegistered();
9698
// send first request through
9799
sendRequestThrough(isValidationSuccessful.get(), null);
98100
// send second request through, to check in case the context got stained by the first one through
@@ -115,6 +117,7 @@ public void testSuccessfulAsyncValidationUntamperedThreadContext() throws Except
115117
)
116118
);
117119
channel.pipeline().addLast(defaultContextAssertingChannelHandler(threadPool.getThreadContext()));
120+
channel.pipeline().fireChannelRegistered();
118121
// send first request through
119122
sendRequestThrough(isValidationSuccessful.get(), validationDone);
120123
// send second request through, to check in case the context got stained by the first one through
@@ -137,6 +140,7 @@ public void testUnsuccessfulAsyncValidationUntamperedThreadContext() throws Exce
137140
)
138141
);
139142
channel.pipeline().addLast(defaultContextAssertingChannelHandler(threadPool.getThreadContext()));
143+
channel.pipeline().fireChannelRegistered();
140144
// send first request through
141145
sendRequestThrough(isValidationSuccessful.get(), validationDone);
142146
// send second request through, to check in case the context got stained by the first one through

0 commit comments

Comments
 (0)