Skip to content

Commit

Permalink
Fix server bind failure logging test
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfurmanski committed Mar 19, 2018
1 parent be2409a commit 6a1c4eb
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -53,7 +53,7 @@ public void teardown() throws IOException
} }


@Test @Test
public void catchupServerMessage() throws Throwable public void testAddressAlreadyBoundMessage() throws Throwable
{ {
// given // given
testSocket = bindPort( "localhost", PortAuthority.allocatePort() ); testSocket = bindPort( "localhost", PortAuthority.allocatePort() );
Expand All @@ -63,7 +63,7 @@ public void catchupServerMessage() throws Throwable
AssertableLogProvider userLogProvider = new AssertableLogProvider(); AssertableLogProvider userLogProvider = new AssertableLogProvider();
ListenSocketAddress listenSocketAddress = new ListenSocketAddress( "localhost", testSocket.getLocalPort() ); ListenSocketAddress listenSocketAddress = new ListenSocketAddress( "localhost", testSocket.getLocalPort() );


Server catchupServer = new Server( mockInitializer(), null, logProvider, userLogProvider, listenSocketAddress, "catchup-server" ); Server catchupServer = new Server( mockInitializer(), null, logProvider, userLogProvider, listenSocketAddress, "server-name" );


//then //then
try try
Expand All @@ -74,8 +74,8 @@ public void catchupServerMessage() throws Throwable
{ {
//expected. //expected.
} }
logProvider.assertContainsMessageContaining( "Address is already bound for setting" ); logProvider.assertContainsMessageContaining( "server-name: address is already bound: " );
userLogProvider.assertContainsMessageContaining( "Address is already bound for setting" ); userLogProvider.assertContainsMessageContaining( "server-name: address is already bound: " );
} }


private ChannelInitializer<SocketChannel> mockInitializer() private ChannelInitializer<SocketChannel> mockInitializer()
Expand Down

0 comments on commit 6a1c4eb

Please sign in to comment.