JAVA-12184 removed ExampleManual*Test and *ParallelManualTest (#12314)

This commit is contained in:
Keerthi 2022-06-08 03:17:55 +10:00 committed by GitHub
parent 74dbf0d0c9
commit b62c9db32f
4 changed files with 0 additions and 107 deletions

View File

@ -1,29 +0,0 @@
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class Example1ManualTest {
@Test
public void test1a() {
block(3000);
}
@Test
public void test1b() {
block(3000);
}
public static void block(long ms) {
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
System.out.println("Thread interrupted");
}
}
}

View File

@ -1,29 +0,0 @@
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class Example2ManualTest {
@Test
public void test1a() {
block(3000);
}
@Test
public void test1b() {
block(3000);
}
public static void block(long ms) {
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
System.out.println("Thread Interrupted");
}
}
}

View File

@ -1,24 +0,0 @@
package com.baeldung;
import org.junit.Test;
import org.junit.experimental.ParallelComputer;
import org.junit.runner.Computer;
import org.junit.runner.JUnitCore;
public class ParallelManualTest {
@Test
public void runTests() {
final Class<?>[] classes = { Example1ManualTest.class, Example2ManualTest.class };
JUnitCore.runClasses(new Computer(), classes);
}
@Test
public void runTestsInParallel() {
final Class<?>[] classes = { Example1ManualTest.class, Example2ManualTest.class };
JUnitCore.runClasses(new ParallelComputer(true, true), classes);
}
}

View File

@ -1,25 +0,0 @@
package com.baeldung.jupiter;
import com.baeldung.Example1ManualTest;
import com.baeldung.Example2ManualTest;
import org.junit.experimental.ParallelComputer;
import org.junit.jupiter.api.Test;
import org.junit.runner.Computer;
import org.junit.runner.JUnitCore;
class Spring5JUnit5ParallelManualTest {
@Test
void givenTwoTestClasses_whenJUnitRunParallel_thenTheTestsExecutingParallel() {
final Class<?>[] classes = { Example1ManualTest.class, Example2ManualTest.class };
JUnitCore.runClasses(new ParallelComputer(true, true), classes);
}
@Test
void givenTwoTestClasses_whenJUnitRunParallel_thenTheTestsExecutingLinear() {
final Class<?>[] classes = { Example1ManualTest.class, Example2ManualTest.class };
JUnitCore.runClasses(new Computer(), classes);
}
}