Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pan3793 committed Oct 18, 2024
1 parent 6eb51b8 commit 770f89b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
import org.apache.zeppelin.user.AuthenticationInfo;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -651,6 +652,7 @@ void testLivyParams() throws InterpreterException {
}

@Test
@Disabled("ZEPPELIN-6134: failed due to a livy-side(likely) classloader issue")
void testLivyTutorialNote() throws IOException, InterpreterException {
if (!checkPreCondition()) {
return;
Expand Down Expand Up @@ -678,17 +680,16 @@ void testLivyTutorialNote() throws IOException, InterpreterException {
.setInterpreterOut(output)
.build();

// the case failed due to a classloader issue, see ZEPPELIN-6134 for more details.
String p1 = IOUtils.toString(getClass().getResourceAsStream("/livy_tutorial_1.scala"),
StandardCharsets.UTF_8);
InterpreterResult result1 = sparkInterpreter.interpret(p1, context);
// assertEquals(InterpreterResult.Code.SUCCESS, result1.code(), result1.toString());
InterpreterResult result = sparkInterpreter.interpret(p1, context);
assertEquals(InterpreterResult.Code.SUCCESS, result.code(), result.toString());

String p2 = IOUtils.toString(getClass().getResourceAsStream("/livy_tutorial_2.sql"),
StandardCharsets.UTF_8);
InterpreterResult result2 = sqlInterpreter.interpret(p2, context);
assertEquals(InterpreterResult.Code.SUCCESS, result2.code(), result2.toString());
assertEquals(InterpreterResult.Type.TABLE, result2.message().get(0).getType());
result = sqlInterpreter.interpret(p2, context);
assertEquals(InterpreterResult.Code.SUCCESS, result.code(), result.toString());
assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType());
} finally {
sparkInterpreter.close();
sqlInterpreter.close();
Expand Down

0 comments on commit 770f89b

Please sign in to comment.