This is an automated email from the ASF dual-hosted git repository.
wuweijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git
The following commit(s) were added to refs/heads/master by this push:
new 335578e Add unit case for JobSystemException (#2027)
335578e is described below
commit 335578ea36d7ee684e8f22fd9cf6e13a9ad10040
Author: verysu <[email protected]>
AuthorDate: Wed Dec 29 12:44:51 2021 +0800
Add unit case for JobSystemException (#2027)
* add JobSystemException Constructor
fixed Script Job throw Exception stack was ignored
* Add unit case for JobSystemException
---
.../elasticjob/infra/exception/JobSystemExceptionTest.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git
a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/exception/JobSystemExceptionTest.java
b/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/exception/JobSystemExceptionTest.java
index a2cd675..12d1f0f 100644
---
a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/exception/JobSystemExceptionTest.java
+++
b/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/exception/JobSystemExceptionTest.java
@@ -31,6 +31,13 @@ public final class JobSystemExceptionTest {
}
@Test
+ public void assertGetMessageCause() {
+ JobSystemException jobSystemException = new
JobSystemException("message is: ", new RuntimeException());
+ assertThat(jobSystemException.getMessage(), is("message is: "));
+ assertThat(jobSystemException.getCause(),
instanceOf(RuntimeException.class));
+ }
+
+ @Test
public void assertGetCause() {
assertThat(new JobSystemException(new RuntimeException()).getCause(),
instanceOf(RuntimeException.class));
}