zjffdu commented on a change in pull request #3609: [ZEPPELIN-4555]. paragraph 
title is disappear after I run the paragraph
URL: https://github.com/apache/zeppelin/pull/3609#discussion_r368548570
 
 

 ##########
 File path: 
zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
 ##########
 @@ -1123,29 +1123,35 @@ public void testInterpreterSettingConfig() {
     //      "checkEmpty": true
     //    },
     p1.setText("%config_test sleep 1000");
-    note.runAll(AuthenticationInfo.ANONYMOUS, false);
-
-    // wait until first paragraph finishes and second paragraph starts
-    while (p1.getStatus() != Status.FINISHED) Thread.yield();
+    p1.execute(true);
 
     // Check if the config_test interpreter default parameter takes effect
     LOGGER.info("p1.getConfig() =  " + p1.getConfig());
-    assertEquals(config.get(Paragraph.PARAGRAPH_CONFIG_RUNONSELECTIONCHANGE), 
false);
-    assertEquals(config.get(Paragraph.PARAGRAPH_CONFIG_TITLE), true);
-    assertEquals(config.get(Paragraph.PARAGRAPH_CONFIG_CHECK_EMTPY), false);
+    
assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_RUNONSELECTIONCHANGE),
 false);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_TITLE), true);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_CHECK_EMTPY), 
false);
 
     // The mock1 interpreter does not set default parameters
     p1.setText("%mock1 sleep 1000");
-    note.runAll(AuthenticationInfo.ANONYMOUS, false);
+    p1.execute(true);
 
-    // wait until first paragraph finishes and second paragraph starts
-    while (p1.getStatus() != Status.FINISHED) Thread.yield();
+    // mock1 has no config setting in interpreter-setting.json, so keep the 
previous config
+    LOGGER.info("changed intp p1.getConfig() =  " + p1.getConfig());
+    
assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_RUNONSELECTIONCHANGE),
 false);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_TITLE), true);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_CHECK_EMTPY), 
false);
 
 Review comment:
   @liuxunorg The problem here we could not override the config with the config 
in interpreter-setting. Basically config could from 3 sources when user change 
interpreter in one paragraph:
   * the old interpreter's default config
   * the new interpreter's default config
   * config made by user manually
   
   Actually we could not decide where the config come from, that's why I will 
keep the previous config which I think is the best approach to handle this 
https://github.com/bbonnin/zeppelin-mongodb-interpreter

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to