Skip to content

Commit 070b14e

Browse files
committed
[ci] Use assert fail instead of printStackTrace
1 parent 688db39 commit 070b14e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/test/java/org/apache/ibatis/submitted/blocking_cache/BlockingCacheTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2015 the original author or authors.
2+
* Copyright 2009-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -85,7 +85,7 @@ private void accessDB() {
8585
try {
8686
Thread.sleep(500);
8787
} catch (InterruptedException e) {
88-
e.printStackTrace();
88+
Assert.fail(e.getMessage());
8989
}
9090
} finally {
9191
sqlSession1.close();

src/test/java/org/apache/ibatis/submitted/null_associations/FooMapperTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2015 the original author or authors.
2+
* Copyright 2009-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ public static void setUpBeforeClass() {
4242
Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/null_associations/create-schema-mysql.sql");
4343
runner.runScript(reader);
4444
} catch (Exception ex) {
45-
ex.printStackTrace();
45+
Assert.fail(ex.getMessage());
4646
}
4747
}
4848

src/test/java/org/apache/ibatis/submitted/overwritingproperties/FooMapperTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static void setUpBeforeClass() {
4343
Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/overwritingproperties/create-schema-mysql.sql");
4444
runner.runScript(reader);
4545
} catch (Exception ex) {
46-
ex.printStackTrace();
46+
Assert.fail(ex.getMessage());
4747
}
4848
}
4949

0 commit comments

Comments
 (0)