netanel246 edited a comment on pull request #516: URL: https://github.com/apache/incubator-sedona/pull/516#issuecomment-866569815
> > @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. -- 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: [email protected]
