Github user amishra44 commented on a diff in the pull request:
https://github.com/apache/spark/pull/9605#discussion_r56955873
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/util/WriteAheadLogSuite.scala
---
@@ -375,28 +380,9 @@ class BatchedWriteAheadLogSuite extends
CommonWriteAheadLogTests(
p
}
- /**
- * In order to block the writes on the writer thread, we mock the write
method, and block it
- * for some time with a promise.
- */
- private def writeBlockingPromise(wal: WriteAheadLog): Promise[Any] = {
- // we would like to block the write so that we can queue requests
- val promise = Promise[Any]()
- when(wal.write(any[ByteBuffer], any[Long])).thenAnswer(
- new Answer[WriteAheadLogRecordHandle] {
- override def answer(invocation: InvocationOnMock):
WriteAheadLogRecordHandle = {
- Await.ready(promise.future, 4.seconds)
- walHandle
- }
- }
- )
- promise
- }
-
test("BatchedWriteAheadLog - name log with aggregated entries with the
timestamp of last entry") {
- val batchedWal = new BatchedWriteAheadLog(wal, sparkConf)
--- End diff --
test
---
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]