1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| package jtr.test.jee.client; |
12 |
| |
13 |
| import jtr.runners.AbstractRunner; |
14 |
| import jtr.test.IOutcome; |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| public class FailingTest extends AbstractRunner { |
26 |
| |
27 |
| |
28 |
20
| public FailingTest() {
|
29 |
| } |
30 |
| |
31 |
9990
| public void test() throws Throwable {
|
32 |
9996
| int instances = getInstanceCount();
|
33 |
9997
| if(instances==0)
|
34 |
0
| throw new IllegalStateException("getInstanceCount cannot return a 0 value");
|
35 |
| |
36 |
9998
| throw new RuntimeException("This runner test error reporting.");
|
37 |
| } |
38 |
| |
39 |
10000
| public void receiveFailureNotification(Throwable t, String msg) {
|
40 |
10000
| logger.error("The following error occurred in run/epoch "+getCurrentRun()+"/"+getEpoch());
|
41 |
| } |
42 |
| |
43 |
20
| public void cleanupResources() {
|
44 |
| } |
45 |
| |
46 |
9999
| public void enrichOutcome(IOutcome outcome) {
|
47 |
9999
| outcome.setUserObject("This is a sample message from the runner "+this.getClass().getSimpleName());
|
48 |
| } |
49 |
| } |