whisklabs / docker-it-scala

Docker integration testing kit with Scala
MIT License
431 stars 91 forks source link

Shutdown connection before running tests #119

Closed agajek closed 6 years ago

agajek commented 6 years ago

Just after opening connection closes itself with following log

08:23:58.105 DEBUG c.g.d.c.c.LogContainerResultCallback - STDOUT: 2018-05-27T06:23:58.075+0000 I CONTROL  [initandlisten] options: { storage: { journal: { enabled: false }, mmapv1: { smallFiles: true }, syncPeriodSecs: 0.0 } }
08:23:58.105 DEBUG c.g.d.c.c.LogContainerResultCallback - STDOUT: 2018-05-27T06:23:58.076+0000 I INDEX    [initandlisten] allocating new ns file /data/db/local.ns, filling with zeroes...
08:23:58.150 DEBUG org.apache.http.wire - http-outgoing-3 << "e2[\r][\n]"
08:23:58.150 DEBUG org.apache.http.wire - http-outgoing-3 << "[0x1][0x0][0x0][0x0][0x0][0x0][0x0]y2018-05-27T06:23:58.176+0000 I STORAGE  [FileAllocator] allocating new datafile /data/db/local.0, filling with zeroes...[\n]"
08:23:58.150 DEBUG org.apache.http.wire - http-outgoing-3 << "[0x1][0x0][0x0][0x0][0x0][0x0][0x0]Y2018-05-27T06:23:58.176+0000 I STORAGE  [FileAllocator] creating directory /data/db/_tmp[\n]"
08:23:58.150 DEBUG org.apache.http.wire - http-outgoing-3 << "[\r][\n]"
08:23:58.150 DEBUG c.g.d.c.c.LogContainerResultCallback - STDOUT: 2018-05-27T06:23:58.176+0000 I STORAGE  [FileAllocator] allocating new datafile /data/db/local.0, filling with zeroes...
08:23:58.150 DEBUG c.g.d.c.c.LogContainerResultCallback - STDOUT: 2018-05-27T06:23:58.176+0000 I STORAGE  [FileAllocator] creating directory /data/db/_tmp
08:23:58.154 DEBUG org.apache.http.wire - http-outgoing-3 << "88[\r][\n]"
08:23:58.154 DEBUG org.apache.http.wire - http-outgoing-3 << "[0x1][0x0][0x0][0x0][0x0][0x0][0x0][0x80]2018-05-27T06:23:58.179+0000 I STORAGE  [FileAllocator] done allocating datafile /data/db/local.0, size: 16MB,  took 0.001 secs[\n]"
08:23:58.154 DEBUG org.apache.http.wire - http-outgoing-3 << "[\r][\n]"
08:23:58.154 DEBUG c.g.d.c.c.LogContainerResultCallback - STDOUT: 2018-05-27T06:23:58.179+0000 I STORAGE  [FileAllocator] done allocating datafile /data/db/local.0, size: 16MB,  took 0.001 secs
08:23:58.157 DEBUG org.apache.http.wire - http-outgoing-3 << "66[\r][\n]"
08:23:58.157 DEBUG org.apache.http.wire - http-outgoing-3 << "[0x1][0x0][0x0][0x0][0x0][0x0][0x0]^2018-05-27T06:23:58.182+0000 I NETWORK  [initandlisten] waiting for connections on port 27017[\n]"
08:23:58.157 DEBUG org.apache.http.wire - http-outgoing-3 << "[\r][\n]"
08:23:58.157 DEBUG c.g.d.c.c.LogContainerResultCallback - STDOUT: 2018-05-27T06:23:58.182+0000 I NETWORK  [initandlisten] waiting for connections on port 27017
08:23:58.158 DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-3: Shutdown connection
08:23:58.158 DEBUG o.a.h.impl.execchain.MainClientExec - Connection discarded
08:23:58.158 DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-3: Close connection
08:23:58.158 DEBUG c.g.d.j.JerseyDockerCmdExecFactory$1 - Connection released: [id: 3][route: {}->unix://localhost:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
08:23:58.158 DEBUG org.apache.http.wire - http-outgoing-3 << "end of stream"
08:23:58.566 DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:1}
08:23:59.070 DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:2}
08:23:59.573 DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:3}
08:24:00.074 DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:4}
08:24:00.579 DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:5}
08:24:01.083 DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:6}

I'm using 0.9.5. with scalatest 3.0.5. Tried Spotify and Java clients both.

agajek commented 6 years ago

Adding implicit patience fixed an issue.