File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
transport/src/test/java/io/netty/channel Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -189,8 +189,9 @@ public void testChannelHandlerContextNavigation() {
189
189
190
190
@ Test
191
191
public void testFireChannelRegistered () throws Exception {
192
- ChannelPipeline pipeline = new LocalChannel (group .next ()).pipeline ();
193
192
final CountDownLatch latch = new CountDownLatch (1 );
193
+ Channel ch = new LocalChannel (group .next ());
194
+ ChannelPipeline pipeline = ch .pipeline ();
194
195
pipeline .addLast (new ChannelInitializer <Channel >() {
195
196
@ Override
196
197
protected void initChannel (Channel ch ) throws Exception {
@@ -202,7 +203,7 @@ public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
202
203
});
203
204
}
204
205
});
205
- pipeline . fireChannelRegistered ( );
206
+ ch . unsafe (). register ( ch . newPromise () );
206
207
assertTrue (latch .await (2 , TimeUnit .SECONDS ));
207
208
}
208
209
You can’t perform that action at this time.
0 commit comments