Skip to content

Commit 44f1bf6

Browse files
committed
Placed the tests in a dedicated directory rather than under src/test
1 parent ade41c1 commit 44f1bf6

File tree

3 files changed

+15
-67
lines changed

3 files changed

+15
-67
lines changed

src/test/java/TestApgasEnvironment.java renamed to examples/TestApgasEnvironment.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
import static org.junit.Assert.*;
43

54
import org.junit.Test;
@@ -14,15 +13,19 @@
1413
import static apgas.Constructs.*;
1514

1615
/**
17-
* Test class that checks how the Junit various asserts behave with the APGAS
18-
* remote activities and illustrates how to handle them.
16+
* Test class that checks how the Junit assertions behave with the APGAS
17+
* remote activities framework and illustrates how to handle them.
18+
* <p>
19+
* A specific launcher included in this library is used: (MpiApgasTestLauncher.class).
20+
* This launcher will initialize both the APGAS and the MPI environment before
21+
* launching the tests.
1922
*/
2023
@RunWith(MpiRunner.class)
2124
@MpiConfig(ranks=2, launcher=MpiApgasTestLauncher.class)
2225
public class TestApgasEnvironment {
2326

2427
/**
25-
* Checks that the test is indeed run with multiple places
28+
* Checks that the test is indeed run with multiple APGAS places
2629
*/
2730
@Test
2831
public void testMultipleHosts() {
@@ -32,7 +35,7 @@ public void testMultipleHosts() {
3235

3336
/**
3437
* Tests the failure of an assertEquals call in an asynchronous remote
35-
* remote activity.
38+
* activity.
3639
*/
3740
@Test(expected=java.lang.AssertionError.class)
3841
public void testRemoteAssertEqualsFailure() throws Throwable {
@@ -49,6 +52,5 @@ public void testRemoteAssertEqualsFailure() throws Throwable {
4952
Throwable[] suppressed = e.getSuppressed();
5053
throw(suppressed[0]);
5154
}
52-
5355
}
5456
}

src/test/java/ITMpiEnvironment.java renamed to examples/TestMpiEnvironment.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import static org.junit.Assert.*;
42

53
import org.junit.BeforeClass;
@@ -12,12 +10,13 @@
1210
import mpi.MPI;
1311

1412
/**
15-
* Test class that checks how the Junit various asserts behave with the APGAS
16-
* remote activities and illustrates how to handle them.
13+
* Test class that demonstrates how the tests are run and
14+
* how the Junit assertions / failure behave in case they
15+
* fail.
1716
*/
1817
@RunWith(MpiRunner.class)
1918
@MpiConfig(ranks=4)
20-
public class ITMpiEnvironment {
19+
public class TestMpiEnvironment {
2120

2221
static int rank = -1;
2322
static int size = -1;
@@ -27,8 +26,9 @@ public static void beforeClass() throws Exception {
2726
rank = MPI.COMM_WORLD.Rank();
2827
size = MPI.COMM_WORLD.Size();
2928
}
30-
/**
31-
* Checks that the test was indeed run with multiple places
29+
30+
/**
31+
* Checks that the test was indeed run with multiple hosts
3232
*/
3333
@Test
3434
public void testMultipleHosts() {

src/test/java/ITApgasEnvironment.java

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)