geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject incubator-geode git commit: GEODE-2112: Improved cleanup for UITests
Date Tue, 15 Nov 2016 17:42:57 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 6118a6a95 -> cc996a61d


GEODE-2112: Improved cleanup for UITests

UITests were failing when more than one was run because
they all share a base class that was not properly cleaned up.

This closes #284


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cc996a61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cc996a61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cc996a61

Branch: refs/heads/develop
Commit: cc996a61d72123c358ced362fb884169e068bcff
Parents: 6118a6a
Author: Jared Stewart <jstewart@pivotal.io>
Authored: Mon Nov 14 16:06:49 2016 -0800
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Nov 15 09:32:22 2016 -0800

----------------------------------------------------------------------
 .../tools/pulse/tests/ui/PulseAbstractTest.java | 21 ++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cc996a61/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseAbstractTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseAbstractTest.java
b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseAbstractTest.java
index 9116a80..89ccb3f 100644
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseAbstractTest.java
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseAbstractTest.java
@@ -224,8 +224,18 @@ public abstract class PulseAbstractTest extends PulseBaseTest {
 
   @AfterClass
   public static void tearDownAfterClass() throws Exception {
-    driver.close();
-    jetty.stop();
+    if (driver != null) {
+      driver.close();
+      driver = null;
+    }
+    if (jetty != null) {
+      jetty.stop();
+      jetty = null;
+    }
+    if (server != null) {
+      server.stop();
+      server = null;
+    }
   }
 
   @Before
@@ -402,10 +412,7 @@ public abstract class PulseAbstractTest extends PulseBaseTest {
   @Test
   public void testClusterGridViewMemberID() throws InterruptedException {
     searchByIdAndClick("default_grid_button");
-    List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
// gives
-                                                                                        
            // me
-                                                                                        
            // 11
-                                                                                        
            // rows
+    List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
 
     for (int memberCount = 1; memberCount < elements.size(); memberCount++) {
       String memberId = driver
@@ -932,7 +939,6 @@ public abstract class PulseAbstractTest extends PulseBaseTest {
       String loadAvgM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".loadAverage");
       assertEquals(df2.format(Double.valueOf(loadAvgM1)), LoadAvgM1);
 
-
       String ThreadsM1 = driver
           .findElement(
               By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 3) + "]/div[2]/div"))
@@ -1035,7 +1041,6 @@ public abstract class PulseAbstractTest extends PulseBaseTest {
     wait.until(ExpectedConditions
         .visibilityOf(driver.findElement(By.xpath("//label[text()='Data Browser']"))));
 
-
     // Verify all elements must be displayed on data browser screen
     assertTrue(driver.findElement(By.xpath("//a[text()='Data Regions']")).isDisplayed());
     assertTrue(driver.findElement(By.id("linkColocatedRegions")).isDisplayed());


Mime
View raw message