You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2021/09/20 09:22:13 UTC

[zeppelin] branch branch-0.10 updated: [HotFix] Fix flaky test

This is an automated email from the ASF dual-hosted git repository.

jongyoul pushed a commit to branch branch-0.10
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.10 by this push:
     new 4c7c3c6  [HotFix] Fix flaky test
4c7c3c6 is described below

commit 4c7c3c6054462faadbfb7332e33950b0918633af
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Mon Sep 13 20:13:20 2021 +0800

    [HotFix] Fix flaky test
    
    ### What is this PR for?
    
    Before this PR, 2 tests are failed.
    ```
    Tests in error:
      ZeppelinIT.testSparkInterpreterDependencyLoading:221->AbstractZeppelinIT.clickAndWait:164 » ElementNotInteractable
      ZeppelinIT.deleteTrashNode:347->AbstractZeppelinIT.deleteTrashNotebook:153 » NoSuchElement
    ```
    This PR fix ZeppelinIT.deleteTrashNode and disable ZeppelinIT.testSparkInterpreterDependencyLoading for later fix.
    
    ### What type of PR is it?
    [Bug Fix ]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    
    ### How should this be tested?
    * CI pass
    
    ### 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: Jeff Zhang <zj...@apache.org>
    
    Closes #4219 from zjffdu/ci_sel and squashes the following commits:
    
    e8cdbf6c5 [Jeff Zhang] Fix flaky ci test
    
    (cherry picked from commit b3706fbf4960856ac11efc66b8ac33c4b85a0d41)
    Signed-off-by: Jongyoul Lee <jo...@gmail.com>
---
 .../src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java      | 3 ++-
 .../src/main/java/org/apache/zeppelin/service/NotebookService.java     | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

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 21af0eb..d2cf34f 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
@@ -197,7 +197,8 @@ public class ZeppelinIT extends AbstractZeppelinIT {
     }
   }
 
-  @Test
+  //It is a flaky test, disable it temporary, should fix it later. ZEPPELIN-5528
+  //@Test
   public void testSparkInterpreterDependencyLoading() throws Exception {
     try {
       // navigate to interpreter page
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
index ab4228a..a956af9 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.Instant;
+import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -78,7 +79,7 @@ public class NotebookService {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(NotebookService.class);
   private static final DateTimeFormatter TRASH_CONFLICT_TIMESTAMP_FORMATTER =
-          DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+          DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault());
 
   private final ZeppelinConfiguration zConf;
   private final Notebook notebook;