Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#827: Added slow unit test
  • Loading branch information
davsclaus committed Dec 10, 2013
1 parent e4ff01d commit 1f7a92f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hawtio-web/pom.xml
Expand Up @@ -380,6 +380,17 @@
</pluginManagement>

<plugins>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- skip dummy tests -->
<excludes>
<exclude>io/hawt/dummy/*.java</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
Expand Down
32 changes: 32 additions & 0 deletions hawtio-web/src/test/java/io/hawt/dummy/DummySlowTest.java
@@ -0,0 +1,32 @@
package io.hawt.dummy;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DummySlowTest {

private static final Logger LOG = LoggerFactory.getLogger(DummySlowTest.class);

@Before
public void init() throws Exception {
LOG.info("Init test");
}

@After
public void destroy() throws Exception {
LOG.info("Destroy test");
}

@Test
public void testSlow() throws Exception {
// TODO: detect mbean and only do if jmx detected
for (int i = 0; i < 30; i++) {
LOG.info("Testing slow method iteration {}", i);
Thread.sleep(1000);
}
}

}

0 comments on commit 1f7a92f

Please sign in to comment.