Skip to content

Commit

Permalink
fixing grid test compilation error, one test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Mar 15, 2016
1 parent 49dd3b2 commit b619cda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void setConfiguration(StandaloneConfiguration configuration) {
}

public void boot() {
if (configuration.jettyThreads > 0) {
if (configuration.jettyThreads != null && configuration.jettyThreads > 0) {
server = new Server(new QueuedThreadPool(configuration.jettyThreads));
} else {
server = new Server();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ public int getRealPort() {
};
RegistrationRequest config = new RegistrationRequest();
config.setRole(GridRole.NODE);
config.getConfiguration().put(RegistrationRequest.HUB_HOST, "localhost");
config.getConfiguration().put(RegistrationRequest.HUB_PORT, 4444);
config.getConfiguration().put(RegistrationRequest.PORT, 0);
config.getConfiguration().put(RegistrationRequest.REMOTE_HOST, "http://localhost:0/");
config.getConfiguration().port = 0;
config.getConfiguration().hub = "http://locahost:4444";
SelfRegisteringRemote remote = new SelfRegisteringRemote(config);
remote.setRemoteServer(server);
remote.updateConfigWithRealPort();
String host = (String) remote.getConfiguration().get(RegistrationRequest.REMOTE_HOST);
String host = (String) remote.getConfiguration().getRemoteHost();
assertEquals("Ensure that the remote host is updated properly",
"http://localhost:" + server.getRealPort(), host);

Expand Down

0 comments on commit b619cda

Please sign in to comment.