zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jongy...@apache.org
Subject zeppelin git commit: MINOR Remove tracing logs when testing
Date Mon, 23 Apr 2018 04:18:36 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master b89c9ad23 -> a94713875


MINOR Remove tracing logs when testing

### What is this PR for?
Removing redundant code when testing integration tests. It's hard to debug because of that
kind of less-useful messages of waiting something.

### What type of PR is it?
[Improvement]

### Todos
* [x] - Changed logging option to false

### What is the Jira issue?
N/A

### How should this be tested?
N/A

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jongyoul Lee <jongyoul@gmail.com>

Closes #2936 from jongyoul/minor-remove-redundent-test-logs and squashes the following commits:

7d90bda32 [Jongyoul Lee] Changed all of trace logs disabled Removed an unused Util class


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

Branch: refs/heads/master
Commit: a9471387503f40e38e4dd28a4625a70fe77727bf
Parents: b89c9ad
Author: Jongyoul Lee <jongyoul@gmail.com>
Authored: Sun Apr 22 22:29:06 2018 +0900
Committer: Jongyoul Lee <jongyoul@apache.org>
Committed: Mon Apr 23 13:18:32 2018 +0900

----------------------------------------------------------------------
 .../org/apache/zeppelin/AbstractZeppelinIT.java |  4 +-
 .../integration/ParagraphActionsIT.java         |  2 +-
 .../apache/zeppelin/integration/ZeppelinIT.java |  6 +--
 .../org/apache/zeppelin/ZeppelinITUtils.java    | 39 --------------------
 4 files changed, 6 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a9471387/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
index e1992fb..030ddeb 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
@@ -120,12 +120,12 @@ abstract public class AbstractZeppelinIT {
     block.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']")));
     driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will
be moved to trash')]" +
         "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-    ZeppelinITUtils.sleep(100, true);
+    ZeppelinITUtils.sleep(100, false);
   }
 
   protected void clickAndWait(final By locator) {
     pollingWait(locator, MAX_IMPLICIT_WAIT).click();
-    ZeppelinITUtils.sleep(1000, true);
+    ZeppelinITUtils.sleep(1000, false);
   }
 
   protected void handleException(String message, Exception e) throws Exception {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a9471387/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
index c47cc42..37854bd 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
@@ -220,7 +220,7 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       );
 
       driver.findElement(By.xpath(".//*[@id='main']//button[contains(@ng-click, 'runAllParagraphs')]")).sendKeys(Keys.ENTER);
-      ZeppelinITUtils.sleep(1000, true);
+      ZeppelinITUtils.sleep(1000, false);
       driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Run all paragraphs?')]"
+
           "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
       ZeppelinITUtils.sleep(2000, false);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a9471387/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
index 4d14641..74c3326 100644
--- a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
@@ -186,10 +186,10 @@ public class ZeppelinIT extends AbstractZeppelinIT {
 
       driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
           .sendKeys(Keys.ENTER);
-      ZeppelinITUtils.sleep(1000, true);
+      ZeppelinITUtils.sleep(1000, false);
       driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will
be moved to trash')]" +
           "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-      ZeppelinITUtils.sleep(100, true);
+      ZeppelinITUtils.sleep(100, false);
 
       LOG.info("testCreateNotebook Test executed");
     } catch (Exception e) {
@@ -315,7 +315,7 @@ public class ZeppelinIT extends AbstractZeppelinIT {
 
       //delete created notebook for cleanup.
       deleteTestNotebook(driver);
-      ZeppelinITUtils.sleep(1000, true);
+      ZeppelinITUtils.sleep(1000, false);
 
       LOG.info("testAngularRunParagraph Test executed");
     }  catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a9471387/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
deleted file mode 100644
index cc545a3..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.zeppelin;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ZeppelinITUtils {
-  public static final Logger LOG = LoggerFactory.getLogger(ZeppelinITUtils.class);
-
-  public static void sleep(long millis, boolean logOutput) {
-    if (logOutput) {
-      LOG.info("Starting sleeping for " + (millis / 1000) + " seconds...");
-      LOG.info("Caller: " + Thread.currentThread().getStackTrace()[2]);
-    }
-    try {
-      Thread.sleep(millis);
-    } catch (InterruptedException e) {
-      LOG.error("Exception in WebDriverManager while getWebDriver ", e);
-    }
-    if (logOutput) {
-      LOG.info("Finished.");
-    }
-  }
-}


Mime
View raw message