ARTEMIS-1531 Fixing checkstyle on byteman test
This commit is contained in:
parent
abf104171e
commit
ce9e824297
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue