captainzmc commented on a change in pull request #209: [LIVY-640] Add tests for ThriftServer URL: https://github.com/apache/incubator-livy/pull/209#discussion_r321144138
########## File path: thriftserver/server/src/test/scala/org/apache/livy/thriftserver/ThriftServerSuites.scala ########## @@ -260,6 +277,104 @@ class BinaryThriftServerSuite extends ThriftServerBaseTest with CommonThriftTest override def mode: ServerMode.Value = ServerMode.binary override def port: Int = 20000 + test("test multiple session") { + var defaultV1: String = null + var defaultV2: String = null + var data: ArrayBuffer[Int] = null + try { + // create table + withJdbcStatement { statement => + val queries = Seq( + "CREATE TABLE test_map(key INT, value STRING) USING json", + "CACHE TABLE test_table AS SELECT key FROM test_map ORDER BY key DESC") + + queries.foreach(statement.execute) + + val plan = statement.executeQuery("explain select * from test_table") + plan.next() + plan.next() + assert(plan.getString(1).contains("InMemoryTableScan")) + + val rs1 = statement.executeQuery("SELECT key FROM test_table ORDER BY KEY DESC") Review comment: In fact, I think this create table test hasn’t much to do with multiple sessions. And this test overlaps with other tests. I should delete this. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services