Skip to content

Commit

Permalink
Merge pull request #321 from Netflix/503Test
Browse files Browse the repository at this point in the history
Remove unnecessary synchronized statements
  • Loading branch information
tgianos committed Jul 20, 2016
2 parents 1f3f631 + 69fa3f5 commit f2f1ed4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public JobCountServiceImpl(@NotNull final JobSearchService jobSearchService, @No
* {@inheritDoc}
*/
@Override
public synchronized int getNumJobs() {
public int getNumJobs() {
return this.jobSearchService.getAllRunningJobExecutionsOnHost(this.hostName).size();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public synchronized void onJobFinished(final JobFinishedEvent event) {
*
* @return the number of jobs currently running on this node
*/
public synchronized int getNumJobs() {
public int getNumJobs() {
return this.jobMonitors.size() + this.scheduledJobs.size();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,9 @@ public void testSubmitJobMethodKillOnTimeout() throws Exception {

if (result.getResponse().getStatus() != HttpStatus.ACCEPTED.value()) {
log.error(
"RESPONSE WASN'T 202 IT WAS: {} AND THE MESSAGE IS: {}",
"RESPONSE WASN'T 202 IT WAS: {} AND THE ERROR MESSAGE IS: {} AND THE CONTENT IS {}",
result.getResponse().getStatus(),
result.getResponse().getErrorMessage(),
result.getResponse().getContentAsString()
);
Assert.fail();
Expand Down Expand Up @@ -858,8 +859,9 @@ public void testSubmitJobMethodFailure() throws Exception {

if (result.getResponse().getStatus() != HttpStatus.ACCEPTED.value()) {
log.error(
"RESPONSE WASN'T 202 IT WAS: {} AND THE MESSAGE IS: {}",
"RESPONSE WASN'T 202 IT WAS: {} AND THE ERROR MESSAGE IS: {} AND THE CONTENT IS {}",
result.getResponse().getStatus(),
result.getResponse().getErrorMessage(),
result.getResponse().getContentAsString()
);
Assert.fail();
Expand Down
4 changes: 4 additions & 0 deletions genie-web/src/test/resources/application-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#
##

endpoints:
health:
time-to-live: 1

genie:
health:
memory:
Expand Down

0 comments on commit f2f1ed4

Please sign in to comment.