sven-lange-last commented on a change in pull request #2878: Streamingly read
user-logs.
URL:
https://github.com/apache/incubator-openwhisk/pull/2878#discussion_r152232798
##########
File path:
tests/src/test/scala/whisk/core/containerpool/docker/test/DockerContainerTests.scala
##########
@@ -470,19 +488,20 @@ class DockerContainerTests
it should "read a simple log without sentinel" in {
val expectedLogEntry = LogLine(Instant.EPOCH.toString, "stdout", "This is
a log entry.\n")
val rawLog = toRawLog(Seq(expectedLogEntry), appendSentinel = false)
- val readResults = mutable.Queue(rawLog)
implicit val docker = new TestDockerClient {
- override def rawContainerLogs(containerId: ContainerId, fromPos: Long):
Future[ByteBuffer] = {
+ override def rawContainerLogs(containerId: ContainerId,
+ fromPos: Long,
+ pollInterval: Option[FiniteDuration]):
Source[ByteString, Any] = {
rawContainerLogsInvocations += ((containerId, fromPos))
Review comment:
We should also record and check the `pollInterval` that is passed. This test
is about reading the log without sentinel. So we expect `rawContainerLogs()` to
read the file to its end and return immediately afterwards.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services