Skip to content

Commit

Permalink
refactor line separator
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 21, 2016
1 parent dfe9942 commit 7b0d9f9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ private void assertExecuteWhenRunOnceAndThrowException(final ShardingContexts sh
verify(jobFacade).postJobStatusTraceEvent(shardingContexts.getTaskId(), State.TASK_STAGING, "Job 'test_job' execute begin.");
verify(jobFacade).postJobStatusTraceEvent(shardingContexts.getTaskId(), State.TASK_RUNNING, "");
String errorMessage;
String lineSeparator = System.getProperty("line.separator");
if (1 == shardingContexts.getShardingItemParameters().size()) {
errorMessage = "{0=java.lang.RuntimeException\n}";
errorMessage = "{0=java.lang.RuntimeException" + lineSeparator + "}";
} else {
errorMessage = "{0=java.lang.RuntimeException\n, 1=java.lang.RuntimeException\n}";
errorMessage = "{0=java.lang.RuntimeException" + lineSeparator + ", 1=java.lang.RuntimeException" + lineSeparator + "}";
}
verify(jobFacade).postJobStatusTraceEvent(shardingContexts.getTaskId(), State.TASK_ERROR, errorMessage);
verify(jobFacade).checkJobExecutionEnvironment();
Expand Down

0 comments on commit 7b0d9f9

Please sign in to comment.