@@ -250,44 +250,18 @@ public void testAltExchConfiguration()
250250 createAltExchConfigTest ("configure-and-read-me" ));
251251 }
252252
253- public void testClientNoAccess ()
254- throws IOException , InterruptedException
255- {
256- runCtl ("set_permissions -p /test test -s client \" \" \" \" amq.direct" );
257- Thread .sleep (2000 );
258- {
259- String queueName =
260- channel .queueDeclare ().getQueue (); // configure
261- channel .queueBind (queueName , "amq.direct" , queueName ); // write
262- channel .queuePurge (queueName ); // read
263- channel .queueDelete (queueName ); // configure
264- }
265-
266- expectExceptionRun (AMQP .ACCESS_REFUSED , new WithName () {
267- public void with (String _) throws IOException {
268- channel .queueDeclare ("amq.genbah" , false , false , false , null );
269- }}
270- );
271-
272- commonNoAccessTests ();
273- }
274-
275253 public void testNoAccess ()
276254 throws IOException , InterruptedException
277255 {
278- runCtl ("set_permissions -p /test -s all test \" \" \" \" \" \" " );
256+ runCtl ("set_permissions -p /test test \" \" \" \" \" \" " );
279257 Thread .sleep (2000 );
258+
280259 expectExceptionRun (AMQP .ACCESS_REFUSED , new WithName () {
281260 public void with (String _) throws IOException {
282261 channel .queueDeclare ();
283262 }}
284263 );
285264
286- commonNoAccessTests ();
287- }
288-
289- private void commonNoAccessTests ()
290- throws IOException {
291265 expectExceptionRun (AMQP .ACCESS_REFUSED , new WithName () {
292266 public void with (String _) throws IOException {
293267 channel .queueDeclare ("justaqueue" , false , false , true , null );
0 commit comments