hudi-bot opened a new issue, #15639:
URL: https://github.com/apache/hudi/issues/15639

   Spark configs are persisted between tests. This can cause interaction 
between tests
   
   ## JIRA info
   
   - Link: https://issues.apache.org/jira/browse/HUDI-5419
   - Type: Test
   - Attachment(s):
     - 20/Dec/22 
17:40;jonvex;logs_24157.zip;https://issues.apache.org/jira/secure/attachment/13054030/logs_24157.zip
   
   
   ---
   
   
   ## Comments
   
   20/Dec/22 17:42;jonvex;[^logs_24157.zip] Are the logs for the last gh 
actions test run. In spark 3.1 file 6_UT - Common & Spark.txt you can see the 
output from the linked pull request. It seems like the tests may be running 
multithreaded but we're not sure. Going to stop work on this for now because 
the ROI is not high.;;;
   
   ---
   
   20/Dec/22 17:44;jonvex;Here is my modified test function from 
HoodieSparkSqlTestBase incase something happens to the closed pr:
   {code:java}
   override protected def test(testName: String, testTags: Tag*)(testFun: => 
Any /* Assertion */)(implicit pos: source.Position): Unit = {
     val conf = spark.sessionState.conf.getAllConfs
     println(s"Before $testName")
     for ((k, v) <- conf) {
       println(s"k: $k, v: $v")
     }
     super.test(testName, testTags: _*)(
       try {
         testFun
       } finally {
         val catalog = spark.sessionState.catalog
         catalog.listDatabases().foreach { db =>
           catalog.listTables(db).foreach { table =>
             catalog.dropTable(table, true, true)
           }
         }
         println(s"After $testName")
         for ((k, v) <- spark.sessionState.conf.getAllConfs) {
           //some configs like spark.driver.port or spark.app.startTime may 
change
           if (k.startsWith("hoodie")) {
             if (!conf.contains(k)) {
               println(s"unsetting k: $k, v: $v")
               spark.sessionState.conf.unsetConf(k)
             } else if (!conf(k).equals(v)) {
               println(s"overwriting k: $k, v: $v with ${conf(k)}")
               spark.sessionState.conf.setConfString(k, conf(k))
             } else {
               println(s"keeping k: $k, v: $v")
             }
           } else {
             println(s"Doesn't start with hoodie k: $k, v: $v")
           }
         }
       }
     )
   } {code};;;


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to