@@ -62,16 +62,14 @@ public void asyncLogContainer() throws Exception {
6262
6363 LogContainerTestCallback loggingCallback = new LogContainerTestCallback ();
6464
65- //this essentially test the since=0 case
65+ // this essentially test the since=0 case
6666 dockerClient .logContainerCmd (container .getId ()).withStdErr ().withStdOut ().exec (loggingCallback );
6767
6868 loggingCallback .awaitCompletion ();
6969
7070 assertTrue (loggingCallback .toString ().contains (snippet ));
7171 }
7272
73-
74-
7573 @ Test
7674 public void asyncLogNonExistingContainer () throws Exception {
7775
@@ -148,6 +146,8 @@ public void asyncLogContainerWithSince() throws Exception {
148146 LOG .info ("Created container: {}" , container .toString ());
149147 assertThat (container .getId (), not (isEmptyString ()));
150148
149+ int timestamp = (int ) (System .currentTimeMillis () / 1000 );
150+
151151 dockerClient .startContainerCmd (container .getId ()).exec ();
152152
153153 int exitCode = dockerClient .waitContainerCmd (container .getId ()).exec ();
@@ -156,8 +156,8 @@ public void asyncLogContainerWithSince() throws Exception {
156156
157157 LogContainerTestCallback loggingCallback = new LogContainerTestCallback ();
158158
159- int oneMinuteIntoFuture = ( int )( System . currentTimeMillis ()/ 1000 ) + 60 ;
160- dockerClient . logContainerCmd ( container . getId ()). withStdErr (). withStdOut (). withSince ( oneMinuteIntoFuture ) .exec (loggingCallback );
159+ dockerClient . logContainerCmd ( container . getId ()). withStdErr (). withStdOut (). withSince ( timestamp )
160+ .exec (loggingCallback );
161161
162162 loggingCallback .awaitCompletion ();
163163
0 commit comments