java-tutorials/testng/src/test/java/baeldung/com/MultiThreadedIntegrationTest.java

15 lines
363 B
Java
Raw Normal View History

2017-03-01 16:47:07 +05:30
package baeldung.com;
import org.testng.Assert;
import org.testng.annotations.Test;
public class MultiThreadedIntegrationTest {
2017-03-01 22:37:00 +01:00
2017-03-01 16:47:07 +05:30
@Test(threadPoolSize = 5, invocationCount = 10, timeOut = 1000)
2017-03-01 22:37:00 +01:00
public void givenMethod_whenRunInThreads_thenCorrect() {
2017-03-01 16:47:07 +05:30
int count = Thread.activeCount();
2017-03-01 22:37:00 +01:00
Assert.assertTrue(count > 1);
2017-03-01 16:47:07 +05:30
}
}