Skip to content

Commit 4910d23

Browse files
committed
add a test
1 parent c454c8a commit 4910d23

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

test/src/com/rabbitmq/client/test/BrokerTestCase.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,15 @@ protected void releaseResources()
8282
protected void restart()
8383
throws IOException {
8484
tearDown();
85-
Host.executeCommand("cd ../rabbitmq-test; make restart-app");
85+
bareRestart();
8686
setUp();
8787
}
8888

89+
protected void bareRestart()
90+
throws IOException {
91+
Host.executeCommand("cd ../rabbitmq-test; make restart-app");
92+
}
93+
8994
public void openConnection()
9095
throws IOException {
9196
if (connection == null) {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.rabbitmq.client.test.server;
2+
3+
import com.rabbitmq.client.test.BrokerTestCase;
4+
import com.rabbitmq.client.AMQP;
5+
import com.rabbitmq.client.Channel;
6+
import com.rabbitmq.client.Connection;
7+
8+
import java.io.IOException;
9+
10+
public class Shutdown extends BrokerTestCase {
11+
12+
public void testErrorOnShutdown() throws Exception {
13+
bareRestart();
14+
expectError(AMQP.CONNECTION_FORCED);
15+
}
16+
17+
}

0 commit comments

Comments
 (0)