From 7752559e5a2502c692f12051fc3ffdb1e865079d Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Thu, 11 Nov 2010 14:10:59 -0800 Subject: [PATCH] Remove dead code causing warnings --- .../admin/JInterfaceIntegrationTests.java | 46 ++++++++----------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/spring-rabbit-admin/src/test/java/org/springframework/amqp/rabbit/admin/JInterfaceIntegrationTests.java b/spring-rabbit-admin/src/test/java/org/springframework/amqp/rabbit/admin/JInterfaceIntegrationTests.java index ddf9a523..202a9ec7 100644 --- a/spring-rabbit-admin/src/test/java/org/springframework/amqp/rabbit/admin/JInterfaceIntegrationTests.java +++ b/spring-rabbit-admin/src/test/java/org/springframework/amqp/rabbit/admin/JInterfaceIntegrationTests.java @@ -1,8 +1,21 @@ +/* + * Copyright 2002-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.amqp.rabbit.admin; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; @@ -25,7 +38,7 @@ import com.ericsson.otp.erlang.OtpErlangObject; import com.ericsson.otp.erlang.OtpPeer; import com.ericsson.otp.erlang.OtpSelf; -// @Ignore("manual integration test only.") + public class JInterfaceIntegrationTests { private static Log logger = LogFactory.getLog(JInterfaceIntegrationTests.class); @@ -112,7 +125,6 @@ public class JInterfaceIntegrationTests { @Test public void stressTest() throws Exception { - // String cookie = readCookie(); OtpConnection con = createConnection(); boolean recycleConnection = false; for (int i = 0; i < 100; i++) { @@ -136,33 +148,11 @@ public class JInterfaceIntegrationTests { private void executeRpc(OtpConnection con, boolean recycleConnection, String module, String function) throws Exception, UnknownHostException { con.sendRPC(module, function, new OtpErlangList()); - OtpErlangObject response = con.receiveRPC(); - // System.out.println(module + " response received = " + response.toString()); + con.receiveRPC(); if (recycleConnection) { con.close(); con = createConnection(); } } - private String readCookie() throws Exception { - String cookie = null; - final String dotCookieFilename = System.getProperty("user.home") + File.separator + ".erlang.cookie"; - BufferedReader br = null; - - try { - final File dotCookieFile = new File(dotCookieFilename); - - br = new BufferedReader(new FileReader(dotCookieFile)); - cookie = br.readLine().trim(); - return cookie; - } finally { - try { - if (br != null) { - br.close(); - } - } catch (final IOException e) { - } - } - } - }