a6896eae43
Motivation: NioEventLoopTest.testChannelsRegistered sometimes fails due a race which is related to how SelectionKey and Selector is implemented in the JDK. In the current implementation it will "lazy" remove SelectionKeys from the Set which means we may still have these included sometimes when we use size() to get the number of SelectionKeys. Modifications: Just retry to read the number of registered Channels if we still see 2 Result: Fixes https://github.com/netty/netty/issues/9895