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 1919import com .rabbitmq .client .AMQP ;
2020import com .rabbitmq .client .AlreadyClosedException ;
2121import com .rabbitmq .client .test .BrokerTestCase ;
22+ import com .rabbitmq .tools .Host ;
2223
2324import java .io .IOException ;
2425
@@ -41,6 +42,18 @@ public void testInvalidUserId() {
4142 }
4243 }
4344
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+
4457 private void publish (AMQP .BasicProperties properties ) throws IOException {
4558 channel .basicPublish ("amq.fanout" , "" , properties , "" .getBytes ());
4659 channel .queueDeclare (); // To flush the channel
You can’t perform that action at this time.
0 commit comments