GitHub user tdas opened a pull request:
https://github.com/apache/spark/pull/7809
[STREAMING][TEST][HOTFIX] Fixed Kinesis test to not throw weird errors when
If Kinesis tests are enabled by env ENABLE_KINESIS_TESTS = 1 but no AWS
credentials are found, the desired behavior is the fail the test using with
```
Exception encountered when attempting to run a suite with class name:
org.apache.spark.streaming.kinesis.KinesisBackedBlockRDDSuite *** ABORTED ***
(3 seconds, 5 milliseconds)
[info] java.lang.Exception: Kinesis tests enabled, but could get not AWS
credentials
```
Instead KinesisStreamSuite fails with
```
[info] - basic operation *** FAILED *** (3 seconds, 35 milliseconds)
[info] java.lang.IllegalArgumentException: requirement failed: Stream not
yet created, call createStream() to create one
[info] at scala.Predef$.require(Predef.scala:233)
[info] at
org.apache.spark.streaming.kinesis.KinesisTestUtils.streamName(KinesisTestUtils.scala:77)
[info] at
org.apache.spark.streaming.kinesis.KinesisTestUtils$$anonfun$deleteStream$1.apply(KinesisTestUtils.scala:150)
[info] at
org.apache.spark.streaming.kinesis.KinesisTestUtils$$anonfun$deleteStream$1.apply(KinesisTestUtils.scala:150)
[info] at org.apache.spark.Logging$class.logWarning(Logging.scala:71)
[info] at
org.apache.spark.streaming.kinesis.KinesisTestUtils.logWarning(KinesisTestUtils.scala:39)
[info] at
org.apache.spark.streaming.kinesis.KinesisTestUtils.deleteStream(KinesisTestUtils.scala:150)
[info] at
org.apache.spark.streaming.kinesis.KinesisStreamSuite$$anonfun$3.apply$mcV$sp(KinesisStreamSuite.scala:111)
[info] at
org.apache.spark.streaming.kinesis.KinesisStreamSuite$$anonfun$3.apply(KinesisStreamSuite.scala:86)
[info] at
org.apache.spark.streaming.kinesis.KinesisStreamSuite$$anonfun$3.apply(KinesisStreamSuite.scala:86)
```
This is because attempting to delete a non-existent Kinesis stream throws
uncaught exception. This PR fixes it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tdas/spark kinesis-test-hotfix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7809.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #7809
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]