Commit 7351480c authored by 马博's avatar 马博

update

parent fdeb0172
This diff is collapsed.
...@@ -19,9 +19,11 @@ public class TestListener implements ITestListener { ...@@ -19,9 +19,11 @@ public class TestListener implements ITestListener {
ITestNGMethod method = failedTest.getMethod(); ITestNGMethod method = failedTest.getMethod();
if (context.getFailedTests().getResults(method).size() > 1) { if (context.getFailedTests().getResults(method).size() > 1) {
listOfFailedTests.remove(); listOfFailedTests.remove();
logger.info("context.getFailedTests().getResults(method).size() > 1");
} else { } else {
if (context.getPassedTests().getResults(method).size() > 0) { if (context.getPassedTests().getResults(method).size() > 0) {
listOfFailedTests.remove(); listOfFailedTests.remove();
logger.info("context.getPassedTests().getResults(method).size() > 0");
} }
} }
} }
...@@ -52,5 +54,6 @@ public class TestListener implements ITestListener { ...@@ -52,5 +54,6 @@ public class TestListener implements ITestListener {
public void onStart(ITestContext context) { public void onStart(ITestContext context) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
logger.info("onStart~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
} }
} }
\ No newline at end of file
...@@ -14,6 +14,9 @@ import java.sql.ResultSetMetaData; ...@@ -14,6 +14,9 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
/** /**
* Created by mabo on 2018/9/30 * Created by mabo on 2018/9/30
...@@ -86,6 +89,23 @@ public class http1_Test extends DuibaBase { ...@@ -86,6 +89,23 @@ public class http1_Test extends DuibaBase {
// MysqlUtils sql = new MysqlUtils(); // MysqlUtils sql = new MysqlUtils();
// Map<String,Object> map = sql.findSimpleResultBybds("select * from dafuweng.user where id=2709"); // Map<String,Object> map = sql.findSimpleResultBybds("select * from dafuweng.user where id=2709");
// System.out.println("hello"); // System.out.println("hello");
ExecutorService tp = Executors.newFixedThreadPool(100);
int i=0;
while(i<100){
tp.execute(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(Thread.currentThread().getName());
}
});
i--;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment