Skip to content

Commit

Permalink
优化测试
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Oct 11, 2018
1 parent 014b06a commit 68ecacb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: false
jdk:
- oraclejdk8
script:
- mvn test
- mvn -q test
after_success:
- bash <(curl -s https://codecov.io/bash)
cache:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void test() throws Exception {
Thread.sleep(50);
throw new RuntimeException("1234");
}, true);
for (int i = 0; i < 100; i++) {
for (int i = 0; i < 10; i++) {
jobContainer.submit(() -> sqlExecutor.insert("insert into test values('test')", null), true);
}

Expand All @@ -72,15 +72,17 @@ public void test() throws Exception {
public void testSimple() throws Exception {
try {
BatchAsyncJobContainer jobContainer = asyncJobService.batch();

for (int i = 0; i < 10; i++) {
jobContainer.submit(() -> sqlExecutor.insert("insert into test values('test')", null), false);
}

jobContainer.submit(() -> {
Thread.sleep(10);
Thread.sleep(100);
jobContainer.cancel();
throw new RuntimeException();
}, false);
for (int i = 0; i < 100; i++) {
jobContainer.submit(() -> sqlExecutor.insert("insert into test values('test')", null), false);
}


System.out.println(jobContainer.getResult().size());

} catch (Exception ignore) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package org.hswebframework.web.concurrent.counter;

/**
* TODO 完成注释
*
* @author zhouhao
*/
public interface CounterManager {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 68ecacb

Please sign in to comment.