0
Я запускаю интеграционные тесты в своем приложении java.запустить тесты интеграции mvn в async
вот мой код:
public class MyClassIT {
@Before
public void setUp() throws Exception {
setUp();
}
@Test
public void test1() throws Exception {
doTheIntegration(1);
}
@Test
public void test2() throws Exception {
doTheIntegration(2);
}
@Test
public void test3() throws Exception {
doTheIntegration(3);
}
private static void doTheIntegration(int i) {
System.out.println("started--" + i);
doSomethingLongerThan1Minute();
System.out.println("done--" + i);
}
@After
public void tearDown() throws Exception {
tearDown();
}
}
вот ПОМ безотказное плагин:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
Я бегу mvn verify
и ожидая все 3 теста произойдет асинхронной , но они работают в Синхронизировать
$ mvn verify
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.example.MyClassIT
started--1
done--1
started--2
done--2
started--3
done--3
как я могу заставить их работать async ?