Skip to content

Commit 9110a58

Browse files
author
Alexandru Scvortov
committed
all tests work again
1 parent d8c8fe8 commit 9110a58

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

test/src/com/rabbitmq/client/test/functional/ExchangeDeclare.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,51 +50,51 @@ public void releaseResources() throws IOException {
5050
channel.exchangeDelete(NAME);
5151
}
5252

53-
public static void verifyEquivalent(Channel channel, String name,
53+
public static void verifyEquivalent(BrokerTestCase btc, String name,
5454
String type, boolean durable, boolean autoDelete,
5555
Map<String, Object> args) throws IOException {
56-
channel.exchangeDeclarePassive(name);
57-
channel.exchangeDeclare(name, type, durable, autoDelete, args);
56+
btc.channel.exchangeDeclarePassive(name);
57+
btc.channel.exchangeDeclare(name, type, durable, autoDelete, args);
5858
}
5959

6060
// Note: this will close the channel
61-
public void verifyNotEquivalent(Channel channel, String name,
61+
public static void verifyNotEquivalent(BrokerTestCase btc, String name,
6262
String type, boolean durable, boolean autoDelete,
6363
Map<String, Object> args) throws IOException {
64-
channel.exchangeDeclarePassive(name);
64+
btc.channel.exchangeDeclarePassive(name);
6565
try {
66-
channel.exchangeDeclare(name, type, durable, autoDelete, args);
66+
btc.channel.exchangeDeclare(name, type, durable, autoDelete, args);
6767
fail("Exchange was supposed to be not equivalent");
6868
} catch (IOException ioe) {
69-
checkShutdownSignal(AMQP.NOT_ALLOWED, ioe);
69+
btc.checkShutdownSignal(AMQP.NOT_ALLOWED, ioe);
7070
return;
7171
}
7272
}
7373

7474
public void testExchangeNoArgsEquivalence() throws IOException {
7575
channel.exchangeDeclare(NAME, TYPE, false, false, null);
76-
verifyEquivalent(channel, NAME, TYPE, false, false, null);
76+
verifyEquivalent(this, NAME, TYPE, false, false, null);
7777
}
7878

7979
public void testExchangeNonsenseArgsEquivalent() throws IOException {
8080
channel.exchangeDeclare(NAME, TYPE, false, false, null);
8181
Map<String, Object> args = new HashMap<String, Object>();
8282
args.put("nonsensical-argument-surely-not-in-use", "foo");
83-
verifyEquivalent(channel, NAME, TYPE, false, false, args);
83+
verifyEquivalent(this, NAME, TYPE, false, false, args);
8484
}
8585

8686
public void testExchangeDurableNotEquivalent() throws IOException {
8787
channel.exchangeDeclare(NAME, TYPE, false, false, null);
88-
verifyNotEquivalent(channel, NAME, TYPE, true, false, null);
88+
verifyNotEquivalent(this, NAME, TYPE, true, false, null);
8989
}
9090

9191
public void testExchangeTypeNotEquivalent() throws IOException {
9292
channel.exchangeDeclare(NAME, "direct", false, false, null);
93-
verifyNotEquivalent(channel, NAME, "fanout", false, false, null);
93+
verifyNotEquivalent(this, NAME, "fanout", false, false, null);
9494
}
9595

9696
public void testExchangeAutoDeleteNotEquivalent() throws IOException {
9797
channel.exchangeDeclare(NAME, "direct", false, false, null);
98-
verifyNotEquivalent(channel, NAME, "direct", false, true, null);
98+
verifyNotEquivalent(this, NAME, "direct", false, true, null);
9999
}
100100
}

test/src/com/rabbitmq/client/test/server/ExchangeEquivalence.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ public class ExchangeEquivalence extends BrokerTestCase {
4646

4747
public void testAlternateExchangeEquivalence() throws IOException {
4848
channel.exchangeDeclare("alternate", "direct", false, false, args);
49-
ExchangeDeclare.verifyEquivalent(channel, "alternate", "direct", false,
49+
ExchangeDeclare.verifyEquivalent(this, "alternate", "direct", false,
5050
false, args);
5151
}
5252

5353
public void testAlternateExchangeNonEquivalence() throws IOException {
5454
channel.exchangeDeclare("alternate", "direct", false, false, args);
5555
Map<String, Object> altargs = new HashMap<String, Object>();
5656
altargs.put("alternate-exchange", "somewhere");
57-
ExchangeDeclare.verifyNotEquivalent(channel, "alternate", "direct",
57+
ExchangeDeclare.verifyNotEquivalent(this, "alternate", "direct",
5858
false, false, altargs);
5959
}
6060
}

0 commit comments

Comments
 (0)