From a13b8b4e59cd9df3a834b3f7521f0e5e0f186fbe Mon Sep 17 00:00:00 2001 From: Sowmya Krishnan Date: Wed, 17 Jul 2013 12:16:53 +0530 Subject: [PATCH] Fixes CLOUDSTACK-3582 Signed-off-by: Prasanna Santhanam (cherry picked from commit cfd892fc3b72def40ab4cde78a7b844510bb860a) --- .../component/test_netscaler_lb.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py index 146b4c69776..4253adadf22 100644 --- a/test/integration/component/test_netscaler_lb.py +++ b/test/integration/component/test_netscaler_lb.py @@ -2778,11 +2778,27 @@ class TestVmWithLb(cloudstackTestCase): hostnames.append(result) self.debug("Hostnames: %s" % str(hostnames)) - self.assertNotEqual( + if hostnames[0] == hostnames[1]: + ssh_3 = self.vm_2.get_ssh_client( + ipaddress=self.public_ip_1.ipaddress.ipaddress, + reconnect=True + ) + self.debug("Command: hostname") + result = ssh_3.execute("hostname") + self.debug("Output: %s" % result) + hostnames.append(result) + + self.assertNotEqual( + hostnames[0], + hostnames[2], + "Both request should be served by different instances" + ) + else: + self.assertNotEqual( hostnames[0], hostnames[1], "Both request should be served by different instances" - ) + ) except Exception as e: self.fail("Exception occured during SSH: %s - %s" % ( self.public_ip_1.ipaddress.ipaddress,