Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Modify CLI close tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkottegoda committed Aug 10, 2018
1 parent b23ef1d commit ee042a7
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void testCloseChannel(String username, String password, String hostName,
ConnectionMetadata[] connectionMetadataBeforeClosing = getConnections(username, password);

String[] cmd = {CLI_ROOT_COMMAND, Constants.CMD_CLOSE, Constants.CMD_CHANNEL, "1", "--connection",
connectionMetadataBeforeClosing[0].getId().toString()};
connectionMetadataBeforeClosing[0].getId().toString(), Constants.IF_USED_FLAG};
String expectedLog = "Request accepted for forceful disconnection of channel 1 of connection "
+ connectionMetadataBeforeClosing[0].getId().toString();

Expand Down Expand Up @@ -180,13 +180,12 @@ public void testCloseConnection(String username, String password, String hostNam

int channelCount = 3;
//Create 3 connections each having 0, 1 and 2 channels respectively
List<Connection> connections = new ArrayList<>();
connections.add(createConnection(channelCount, username, password, hostName, port));

ConnectionMetadata[] connectionMetadataBeforeClosing = getConnections(username, password);

String[] cmd = {CLI_ROOT_COMMAND, Constants.CMD_CLOSE, Constants.CMD_CONNECTION,
connectionMetadataBeforeClosing[0].getId().toString()};
connectionMetadataBeforeClosing[0].getId().toString(), Constants.IF_USED_FLAG};
String expectedLog = "Connection close request submitted successfully";

Main.main(cmd);
Expand All @@ -198,9 +197,6 @@ public void testCloseConnection(String username, String password, String hostNam
username, password);
Assert.assertEquals(connectionMetadataAfterClosing.length, expectedConnectionCount,
"Incorrect connection count after closing connection.");


closeConnections(connections);
}

@Test(groups = "StreamReading", description = "test command 'close connection [connection-id]' with a "
Expand Down

0 comments on commit ee042a7

Please sign in to comment.