Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run tests with Spark v3.2.1 and scalatest v3.2.x #354

Open
mdadil-dk opened this issue Jun 2, 2022 · 0 comments
Open

Unable to run tests with Spark v3.2.1 and scalatest v3.2.x #354

mdadil-dk opened this issue Jun 2, 2022 · 0 comments

Comments

@mdadil-dk
Copy link

Getting following exception while executing the tests with scala v2.12.15 and Spark v.3.2.1:

[error] Uncaught exception when running com.central.spark.aggregation.streaming.BaseAggregatorSuite: java.lang.IncompatibleClassChangeError: Expected instance not static method org.scalatest.Assertions.assertionsHelper()Lorg/scalatest/Assertions$AssertionsHelper;
[error] sbt.ForkMain$ForkError: java.lang.IncompatibleClassChangeError: Expected instance not static method org.scalatest.Assertions.assertionsHelper()Lorg/scalatest/Assertions$AssertionsHelper;
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteBase.verifyOutput(StreamingSuiteBase.scala:77)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteBase.verifyOutput$(StreamingSuiteBase.scala:61)
[error] 	at com.central.spark.aggregation.streaming.BaseAggregatorSuite.verifyOutput(BaseAggregatorSuite.scala:23)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteBase.$anonfun$testOperation$1(StreamingSuiteBase.scala:162)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteBase.$anonfun$testOperation$1$adapted(StreamingSuiteBase.scala:158)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteCommon.withOutputAndStreamingContext(StreamingSuiteCommon.scala:122)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteCommon.withOutputAndStreamingContext$(StreamingSuiteCommon.scala:114)
[error] 	at com.central.spark.aggregation.streaming.BaseAggregatorSuite.withOutputAndStreamingContext(BaseAggregatorSuite.scala:23)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteBase.testOperation(StreamingSuiteBase.scala:158)
[error] 	at com.holdenkarau.spark.testing.StreamingSuiteBase.testOperation$(StreamingSuiteBase.scala:149)
[error] 	at com.central.spark.aggregation.streaming.BaseAggregatorSuite.testOperation(BaseAggregatorSuite.scala:23)
[error] 	at com.central.spark.aggregation.streaming.BaseAggregatorSuite.$anonfun$new$1(BaseAggregatorSuite.scala:89)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
[error] 	at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
[error] 	at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
[error] 	at org.scalatest.Transformer.apply(Transformer.scala:22)
[error] 	at org.scalatest.Transformer.apply(Transformer.scala:20)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike$$anon$1.apply(AnyFunSuiteLike.scala:226)
[error] 	at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
[error] 	at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
[error] 	at org.scalatest.funsuite.AnyFunSuite.withFixture(AnyFunSuite.scala:1563)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.invokeWithFixture$1(AnyFunSuiteLike.scala:224)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.$anonfun$runTest$1(AnyFunSuiteLike.scala:236)
[error] 	at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.runTest(AnyFunSuiteLike.scala:236)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.runTest$(AnyFunSuiteLike.scala:218)
[error] 	at org.scalatest.funsuite.AnyFunSuite.runTest(AnyFunSuite.scala:1563)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.$anonfun$runTests$1(AnyFunSuiteLike.scala:269)
[error] 	at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:413)
[error] 	at scala.collection.immutable.List.foreach(List.scala:431)
[error] 	at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
[error] 	at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:396)
[error] 	at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:475)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.runTests(AnyFunSuiteLike.scala:269)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.runTests$(AnyFunSuiteLike.scala:268)
[error] 	at org.scalatest.funsuite.AnyFunSuite.runTests(AnyFunSuite.scala:1563)
[error] 	at org.scalatest.Suite.run(Suite.scala:1114)
[error] 	at org.scalatest.Suite.run$(Suite.scala:1096)
[error] 	at org.scalatest.funsuite.AnyFunSuite.org$scalatest$funsuite$AnyFunSuiteLike$$super$run(AnyFunSuite.scala:1563)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.$anonfun$run$1(AnyFunSuiteLike.scala:273)
[error] 	at org.scalatest.SuperEngine.runImpl(Engine.scala:535)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.run(AnyFunSuiteLike.scala:273)
[error] 	at org.scalatest.funsuite.AnyFunSuiteLike.run$(AnyFunSuiteLike.scala:272)
[error] 	at com.central.spark.aggregation.streaming.BaseAggregatorSuite.org$scalatest$BeforeAndAfterAll$$super$run(BaseAggregatorSuite.scala:23)
[error] 	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
[error] 	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
[error] 	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
[error] 	at com.central.spark.aggregation.streaming.BaseAggregatorSuite.run(BaseAggregatorSuite.scala:23)
[error] 	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
[error] 	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:516)
[error] 	at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:413)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

The test dependencies are as follows:

  lazy val coreTestDeps = Seq(
    "org.mockito" % "mockito-all" % 1.10.19 % "test",
    "org.scalatest" %% "scalatest" % 3.2.12 % "it,test",
    "net.sf.opencsv" % "opencsv" % 2.3 % "test",
    "org.json4s" %% "json4s-native" % 3.7.0-M11 % "it,test",
    "org.json4s" %% "json4s-jackson" % 3.7.0-M11 % "it,test",
    "org.apache.spark" %% "spark-streaming" % 3.2.1 % "provided" classifier "tests",
    "org.apache.spark" %% "spark-core" % 3.2.1 % "provided" classifier "tests",
    "com.holdenkarau" %% "spark-testing-base" % "3.2.0_1.1.1" % "test",
    "org.elasticsearch.client" % "elasticsearch-rest-high-level-client" % 7.9.3 % "it,test"
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant