Skip to content

Commit 7b0d9f9

Browse files
committed
refactor line separator
1 parent dfe9942 commit 7b0d9f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

elastic-job-common/elastic-job-common-core/src/test/java/com/dangdang/ddframe/job/executor/type/SimpleJobExecutorTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ private void assertExecuteWhenRunOnceAndThrowException(final ShardingContexts sh
131131
verify(jobFacade).postJobStatusTraceEvent(shardingContexts.getTaskId(), State.TASK_STAGING, "Job 'test_job' execute begin.");
132132
verify(jobFacade).postJobStatusTraceEvent(shardingContexts.getTaskId(), State.TASK_RUNNING, "");
133133
String errorMessage;
134+
String lineSeparator = System.getProperty("line.separator");
134135
if (1 == shardingContexts.getShardingItemParameters().size()) {
135-
errorMessage = "{0=java.lang.RuntimeException\n}";
136+
errorMessage = "{0=java.lang.RuntimeException" + lineSeparator + "}";
136137
} else {
137-
errorMessage = "{0=java.lang.RuntimeException\n, 1=java.lang.RuntimeException\n}";
138+
errorMessage = "{0=java.lang.RuntimeException" + lineSeparator + ", 1=java.lang.RuntimeException" + lineSeparator + "}";
138139
}
139140
verify(jobFacade).postJobStatusTraceEvent(shardingContexts.getTaskId(), State.TASK_ERROR, errorMessage);
140141
verify(jobFacade).checkJobExecutionEnvironment();

0 commit comments

Comments
 (0)