holdenk / holdenk/spark-testing-base

StreamingSuitBase test method ERROR

Open
#142 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.6k
Forks
357
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I'm trying to integrate spark-testing-base into my project, and have an issue.
In the following test, IDE says **"Cannot resolve symbol `test`"**.

```
class RealTimeStatsTest extends StreamingSuiteBase {

type StringPair = (String, String)
type IntegerPair = (Integer, Integer)

test("Send string input") {
val input = List()
val output = List()

testOperation[StringPair, IntegerPair](
input, updateStateByKeyOperation _, output, ordered = false)
}

def updateStateByKeyOperation(stream: DStream[StringPair]): DStream[IntegerPair] = ???
```

Versions are:
- spark-testing-base_2.19:1.6.2_0.4.5
- scala 1.10.5
- Two scalatest are found in IntelliJ External Libraries: scalatest:0.9.1 and scalatest_2.19:2.2.6, I explicitly import none of them though. I just think this is where the error occurs.

More compilation erros in detail:
- Error:scalac: error while loading Suite, Scala signature Suite has wrong version
expected: 5.0, found: 4.1 in Suite.class
- Error:(10, 33) illegal inheritance;
self-type mypackage.RealTimeStatsTest does not conform to com.holdenkarau.spark.testing.StreamingSuiteBase's selftype com.holdenkarau.spark.testing.StreamingSuiteBase with org.scalatest.Suite
- Error:(15, 3) package test is not a value
test("Send string input") {

Contributor guide

Open the contributing guide

Research direction

Start with the RealTimeStatsTest example and the StreamingSuiteBase self-type, then inspect the reported ScalaTest versions and the spark-testing-base_2.19:1.6.2_0.4.5 dependency. Reproduce the Suite signature and unresolved test errors in a minimal test project. Done means the test class compiles and the test("Send string input") method resolves consistently with the selected dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.