Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/15102#discussion_r81836317
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala ---
@@ -469,29 +469,49 @@ trait StreamTest extends QueryTest with
SharedSQLContext with Timeouts {
}
}
+
+ /**
+ * Creates a stress test that randomly starts/stops/adds data/checks the
result.
+ *
+ * @param ds a dataframe that executes + 1 on a stream of integers,
returning the result
+ * @param addData an add data action that adds the given numbers to the
stream, encoding them
+ * as needed
+ * @param iterations the iteration number
+ */
+ def runStressTest(
+ ds: Dataset[Int],
+ addData: Seq[Int] => StreamAction,
+ iterations: Int = 100): Unit = {
+ runStressTest(ds, Seq.empty, (data, running) => addData(data),
iterations)
+ }
+
/**
* Creates a stress test that randomly starts/stops/adds data/checks the
result.
*
- * @param ds a dataframe that executes + 1 on a stream of integers,
returning the result.
- * @param addData and add data action that adds the given numbers to the
stream, encoding them
+ * @param ds a dataframe that executes + 1 on a stream of integers,
returning the result
+ * @param preparedActions actions need to run before starting the stress
test.
--- End diff --
nit: its kind of odd for this to be past tense.
---
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]