Skip to content

Commit

Permalink
fixing port conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lassewesth committed Sep 26, 2017
1 parent 6361825 commit 14a23a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -28,12 +28,13 @@
import org.neo4j.helpers.ListenSocketAddress;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.logging.NullLogProvider;
import org.neo4j.ports.allocation.PortAuthority;
import org.neo4j.test.rule.SuppressOutput;

import static org.junit.Assert.assertEquals;
import static org.neo4j.test.rule.SuppressOutput.suppressAll;

public class JettyThreadLimitTest
public class JettyThreadLimitIT
{
@Rule
public SuppressOutput suppressOutput = suppressAll();
Expand All @@ -48,7 +49,7 @@ public void shouldHaveConfigurableJettyThreadPoolSize() throws Exception
int selectorThreads = 1; // ... and 1 thread will become a selector...
int jobThreads = configuredMaxThreads - acceptorThreads - selectorThreads; // ... and the rest are job threads
server.setMaxThreads( numCores );
server.setAddress( new ListenSocketAddress( "localhost", 7480 ) );
server.setAddress( new ListenSocketAddress( "localhost", PortAuthority.allocatePort() ) );
try
{
server.start();
Expand Down
Expand Up @@ -36,6 +36,7 @@
import org.neo4j.helpers.SocketAddress;
import org.neo4j.logging.Log;
import org.neo4j.logging.NullLogProvider;
import org.neo4j.ports.allocation.PortAuthority;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.hamcrest.CoreMatchers.equalTo;
Expand All @@ -44,9 +45,9 @@
import static org.junit.Assert.assertTrue;
import static org.neo4j.test.assertion.Assert.assertEventually;

public class NonBlockingChannelTest
public class NonBlockingChannelIT
{
private static final int PORT = 7000;
private static final int PORT = PortAuthority.allocatePort();
private static final ChannelHandler VOID_HANDLER = new ChannelInitializer<SocketChannel>()
{
@Override
Expand Down

0 comments on commit 14a23a1

Please sign in to comment.