You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by GitBox <gi...@apache.org> on 2021/06/23 14:23:27 UTC

[GitHub] [incubator-sedona] ericsun95 edited a comment on pull request #516: [Sedona-28] shape&wkb ser de

ericsun95 edited a comment on pull request #516:
URL: https://github.com/apache/incubator-sedona/pull/516#issuecomment-866858832


   > > > @jiayuasu, Thank you.
   > 
   > > > Strangely, if the test runs alone, it succeeds. Only when I run it with another test that uses TestBasicScala does the problem occur.
   > 
   > > > It doesn't help to stop the SparkSession of TestBasicScala. It somehow still exists in my test context. Thus, the test failed because it loads the session with Shape Serde
   > 
   > > 
   > 
   > > This is a very common issue when you didn't close the session between tests. Could you just add one override aftereach function which call sparksession get active session close? Better also move the sparksession create part into beforeeach function.
   > 
   > 
   > 
   > Thank you for your response.
   > 
   > I've tried that and still, I have two spark sessions. Furthermore, the other tests that run after that test keep failing with an error of stopped spark session.
   > 
   > I've also tried to update the TestBaseClass to use BeforeAndAfterEach, the tests that run after WKBGeometrySerializerTest failed with `Cannot call methods on a stopped SparkContext. ` which I do not understand because the beforeEach contains the creation of a spark session.
   > 
   > 
   > 
   > @jiayuasu ,
   > 
   > I tried to use the java test but it behaves the same. 
   > 
   > The test runs alone, but with the [adapterTestJava](https://github.com/apache/incubator-sedona/blob/a8c42896a8fc2f15b56fe817121c965adf0dc2f5/sql/src/test/java/org/apache/sedona/sql/adapterTestJava.java) it fails.
   > 
   > 
   > 
   > 
   
   I don't think writing in Java could bring any differences. Instead, try just sparksession.close() in after each might help. The spark context error might be some of your other tests implicitly rely on the sparksession in this test, which cause the error.


-- 
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:
users@infra.apache.org