ololo3000 commented on a change in pull request #7647: IGNITE-12879 Refactors test configuration of discovery messages interceptors. URL: https://github.com/apache/ignite/pull/7647#discussion_r409426799
########## File path: modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TestTcpDiscoverySpi.java ########## @@ -44,4 +54,24 @@ @Override public void simulateNodeFailure() { super.simulateNodeFailure(); } + + /** {@inheritDoc} */ + @SuppressWarnings("ZeroLengthArrayAllocation") + @Override public void setListener(@Nullable DiscoverySpiListener lsnr) { + super.setListener(lsnr == null || discoHooks.isEmpty() ? Review comment: > It seems to me that we can just pass discoHooks into the listener. > Therefore list always be up to date inside the listener. It's not clear for me in what cases hooks are needed to be modified after SPI start. I think that the current approach is more robust. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services