You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/08/19 01:25:57 UTC

[GitHub] [incubator-kyuubi] timothy65535 edited a comment on pull request #958: [TEST] Ensure two connections in user mode share the same engine

timothy65535 edited a comment on pull request #958:
URL: https://github.com/apache/incubator-kyuubi/pull/958#issuecomment-901537537


   Hi @yaooqinn, got your point.
   
   > ensure two connections in user mode share the same engine
   
   I think it is not the time to add this test case, it is the third point mentioned on https://github.com/apache/incubator-kyuubi/issues/918 .
   
   After we support the engine pool feature, we can add this test case, like
   ```
   test("ensure two connections in user mode share the same engine") {
        
       val conf = KyuubiConf(false)
       conf.set("kyuubi.engine.pool.size", 1)
   
       var r1: String = null
       var r2: String = null
       new Thread {
         override def run(): Unit = withJdbcStatement() { statement =>
           val res = statement.executeQuery("set spark.app.name")
           assert(res.next())
           r1 = res.getString("value")
         }
       }.start()
   
       new Thread {
         override def run(): Unit = withJdbcStatement() { statement =>
           val res = statement.executeQuery("set spark.app.name")
           assert(res.next())
           r2 = res.getString("value")
         }
       }.start()
   
       eventually(timeout(120.seconds), interval(100.milliseconds)) {
         assert(r1 != null && r2 != null)
       }
   
       assert(r1 === r2)
     }
   ```
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org