diff options
Diffstat (limited to 'external/kafka-0-10-sql')
2 files changed, 3 insertions, 1 deletions
diff --git a/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt b/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt new file mode 100644 index 0000000000..6410031743 --- /dev/null +++ b/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt @@ -0,0 +1 @@ +{"topic1":{"0":456,"1":789},"topic2":{"0":0}} diff --git a/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala b/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala index c8326ffcc7..22668fd6fa 100644 --- a/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala +++ b/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala @@ -98,7 +98,8 @@ class KafkaSourceOffsetSuite extends OffsetSuite with SharedSQLContext { private def readFromResource(file: String): SerializedOffset = { import scala.io.Source - val str = Source.fromFile(getClass.getResource(s"/structured-streaming/$file").toURI).mkString + val input = getClass.getResource(s"/$file").toURI + val str = Source.fromFile(input).mkString SerializedOffset(str) } } |