File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 19
19
import com .rabbitmq .client .AMQP ;
20
20
import com .rabbitmq .client .AlreadyClosedException ;
21
21
import com .rabbitmq .client .test .BrokerTestCase ;
22
+ import com .rabbitmq .tools .Host ;
22
23
23
24
import java .io .IOException ;
24
25
@@ -41,6 +42,18 @@ public void testInvalidUserId() {
41
42
}
42
43
}
43
44
45
+ public void testImpersonatedUserId () throws IOException {
46
+ Host .rabbitmqctl ("set_user_tags guest administrator impersonator" );
47
+ connection = null ;
48
+ channel = null ;
49
+ setUp ();
50
+ try {
51
+ publish (BAD );
52
+ } finally {
53
+ Host .rabbitmqctl ("set_user_tags guest administrator" );
54
+ }
55
+ }
56
+
44
57
private void publish (AMQP .BasicProperties properties ) throws IOException {
45
58
channel .basicPublish ("amq.fanout" , "" , properties , "" .getBytes ());
46
59
channel .queueDeclare (); // To flush the channel
You can’t perform that action at this time.
0 commit comments