ARTEMIS-1531 Fixing checkstyle on byteman test

This commit is contained in:
Clebert Suconic 2017-11-29 18:20:18 -05:00
parent abf104171e
commit ce9e824297
1 changed files with 8 additions and 22 deletions

View File

@ -31,39 +31,25 @@ import org.junit.runner.RunWith;
@RunWith(BMUnitRunner.class)
public class FileSystemSyncBlockedTest extends CriticalAnalyzerFaultInjectionTestBase {
@BMRules(
rules = {
@BMRule(
name = "Simulate Slow Disk Sync",
targetClass = "org.apache.activemq.artemis.core.io.nio.NIOSequentialFile",
targetMethod = "sync",
targetLocation = "ENTRY",
condition = "!flagged(\"testSlowDiskSync\")", // Once the server shutdowns we stop applying this rule.
action = "waitFor(\"testSlowDiskSync\")"),
@BMRule(
@BMRules(rules = {@BMRule(name = "Simulate Slow Disk Sync", targetClass = "org.apache.activemq.artemis.core.io.nio.NIOSequentialFile", targetMethod = "sync", targetLocation = "ENTRY", condition = "!flagged(\"testSlowDiskSync\")", // Once the server shutdowns we stop applying this rule.
action = "waitFor(\"testSlowDiskSync\")"), @BMRule(
// We ensure that no more
name = "Release Suspended Thread during Server Shutdown", // Releases wakes up suspended threads to allow shutdown to complete
targetClass = "org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl",
targetMethod = "stop",
targetLocation = "ENTRY",
action = "flag(\"testSlowDiskSync\"); signalWake(\"testSlowDiskSync\")")
})
targetClass = "org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl", targetMethod = "stop", targetLocation = "ENTRY", action = "flag(\"testSlowDiskSync\"); signalWake(\"testSlowDiskSync\")")})
@Test(timeout = 60000)
public void testSlowDiskSync() throws Exception {
testSendDurableMessage();
}
@Test
public void testManyFiles() throws Exception
{
public void testManyFiles() throws Exception {
Session s = conn.createSession(true, Session.SESSION_TRANSACTED);
Queue jmsQueue = s.createQueue(address.toString());
MessageProducer p = s.createProducer(jmsQueue);
p.setDeliveryMode(DeliveryMode.PERSISTENT);
conn.start();
for (int i = 0; i < 1000; i++)
{
for (int i = 0; i < 1000; i++) {
p.send(s.createTextMessage("payload"));
server.getStorageManager().getMessageJournal().forceMoveNextFile();
}