Remove dead code causing warnings
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user