Class groovyx.net.http.EncodersSpec

5

tests

0

failures

0

ignored

1.909s

duration

100%

successful

Tests

Test Duration Result
multipart 1.815s passed
multipart: file (bytes) 0.020s passed
multipart: file (path) 0.033s passed
multipart: file (stream) 0.019s passed
multipart: file (string) 0.022s passed

Standard output

07:28:17.421 [Test worker] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
07:28:17.439 [Test worker] DEBUG io.undertow - starting undertow server io.undertow.Undertow@39f2227f
07:28:17.455 [Test worker] INFO org.xnio - XNIO version 3.3.6.Final
07:28:17.482 [Test worker] INFO org.xnio.nio - XNIO NIO Implementation Version 3.3.6.Final
07:28:17.536 [XNIO-1 I/O-1] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-1', selector sun.nio.ch.EPollSelectorImpl@66d5bc00
07:28:17.536 [XNIO-1 I/O-2] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-2', selector sun.nio.ch.EPollSelectorImpl@300e4ee1
07:28:17.536 [XNIO-1 I/O-3] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-3', selector sun.nio.ch.EPollSelectorImpl@6e868482
07:28:17.536 [XNIO-1 I/O-4] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-4', selector sun.nio.ch.EPollSelectorImpl@44a6a075
07:28:17.536 [XNIO-1 I/O-5] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-5', selector sun.nio.ch.EPollSelectorImpl@55e3fc85
07:28:17.537 [XNIO-1 I/O-6] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-6', selector sun.nio.ch.EPollSelectorImpl@68ed600f
07:28:17.537 [XNIO-1 Accept] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 Accept', selector sun.nio.ch.EPollSelectorImpl@3152723d
07:28:17.537 [XNIO-1 I/O-8] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-8', selector sun.nio.ch.EPollSelectorImpl@5a829c88
07:28:17.537 [XNIO-1 I/O-7] DEBUG org.xnio.nio - Started channel thread 'XNIO-1 I/O-7', selector sun.nio.ch.EPollSelectorImpl@74086678
07:28:17.540 [Test worker] DEBUG io.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
07:28:17.828 [XNIO-1 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /multi (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], Content-Type=[multipart/form-data; boundary=cdODT9mnMC1liLZW], Content-Length=[218], User-Agent=[Java/1.8.0_121], Host=[localhost:43075]}, cookies=[:]): --cdODT9mnMC1liLZW
Content-Type: text/plain
Content-Disposition: form-data; name="alpha"

one
--cdODT9mnMC1liLZW
Content-Type: text/plain
Content-Disposition: form-data; name="bravo"

two
--cdODT9mnMC1liLZW-- }
07:28:17.977 [XNIO-1 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): ok
07:28:18.022 [Test worker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@39f2227f
07:28:18.036 [Test worker] DEBUG io.undertow - starting undertow server io.undertow.Undertow@2c22d26a
07:28:18.037 [XNIO-2 I/O-2] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-2', selector sun.nio.ch.EPollSelectorImpl@6e72ba04
07:28:18.037 [XNIO-2 I/O-3] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-3', selector sun.nio.ch.EPollSelectorImpl@1d12c9bd
07:28:18.037 [XNIO-2 I/O-5] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-5', selector sun.nio.ch.EPollSelectorImpl@295beed
07:28:18.038 [XNIO-2 I/O-1] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-1', selector sun.nio.ch.EPollSelectorImpl@2a60e2e9
07:28:18.038 [Test worker] DEBUG io.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
07:28:18.038 [XNIO-2 Accept] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 Accept', selector sun.nio.ch.EPollSelectorImpl@778bb7c5
07:28:18.038 [XNIO-2 I/O-4] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-4', selector sun.nio.ch.EPollSelectorImpl@42f03493
07:28:18.038 [XNIO-2 I/O-8] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-8', selector sun.nio.ch.EPollSelectorImpl@2a862f64
07:28:18.038 [XNIO-2 I/O-6] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-6', selector sun.nio.ch.EPollSelectorImpl@6b88e0a3
07:28:18.038 [XNIO-2 I/O-7] DEBUG org.xnio.nio - Started channel thread 'XNIO-2 I/O-7', selector sun.nio.ch.EPollSelectorImpl@68fcf8f7
07:28:18.053 [XNIO-2 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /multi (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], Content-Type=[multipart/form-data; boundary=fJJh2rUdoT7U67CK], Content-Length=[286], User-Agent=[Java/1.8.0_121], Host=[localhost:46577]}, cookies=[:]): --fJJh2rUdoT7U67CK
Content-Type: text/plain
Content-Disposition: form-data; name="filea"; filename="file-a.txt"

some-a-content
--fJJh2rUdoT7U67CK
Content-Type: text/plain
Content-Disposition: form-data; name="fileb"; filename="file-b.xtx"

some-b-content
--fJJh2rUdoT7U67CK-- }
07:28:18.057 [XNIO-2 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): ok
07:28:18.059 [Test worker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@2c22d26a
07:28:18.063 [Test worker] DEBUG io.undertow - starting undertow server io.undertow.Undertow@a6ba357
07:28:18.064 [XNIO-2 task-1] DEBUG io.undertow.request.io - UT005013: An IOException occurred
java.nio.channels.ClosedByInterruptException: null
	at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:511)
	at org.xnio.nio.NioSocketConduit.write(NioSocketConduit.java:161)
	at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:247)
	at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:593)
	at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(AbstractFixedLengthStreamSinkConduit.java:106)
	at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(AbstractFixedLengthStreamSinkConduit.java:120)
	at io.undertow.conduits.DeflatingStreamSinkConduit.performFlushIfRequired(DeflatingStreamSinkConduit.java:419)
	at io.undertow.conduits.DeflatingStreamSinkConduit.flush(DeflatingStreamSinkConduit.java:349)
	at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162)
	at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119)
	at org.xnio.channels.Channels.flushBlocking(Channels.java:63)
	at io.undertow.io.UndertowOutputStream.close(UndertowOutputStream.java:344)
	at io.undertow.io.BlockingSenderImpl.close(BlockingSenderImpl.java:170)
	at io.undertow.io.DefaultIoCallback.onComplete(DefaultIoCallback.java:54)
	at io.undertow.io.BlockingSenderImpl.invokeOnComplete(BlockingSenderImpl.java:227)
	at io.undertow.io.BlockingSenderImpl.send(BlockingSenderImpl.java:95)
	at io.undertow.io.BlockingSenderImpl.send(BlockingSenderImpl.java:117)
	at com.stehno.ersatz.ErsatzServer.send(ErsatzServer.groovy:392)
	at com.stehno.ersatz.ErsatzServer.access$0(ErsatzServer.groovy)
	at com.stehno.ersatz.ErsatzServer$1.handleRequest(ErsatzServer.groovy:302)
	at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:208)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
07:28:18.064 [XNIO-3 I/O-4] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-4', selector sun.nio.ch.EPollSelectorImpl@364bf576
07:28:18.064 [XNIO-3 I/O-2] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-2', selector sun.nio.ch.EPollSelectorImpl@75f49747
07:28:18.065 [XNIO-3 I/O-5] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-5', selector sun.nio.ch.EPollSelectorImpl@61c222d2
07:28:18.065 [XNIO-3 I/O-3] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-3', selector sun.nio.ch.EPollSelectorImpl@55d25db0
07:28:18.065 [XNIO-3 I/O-1] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-1', selector sun.nio.ch.EPollSelectorImpl@5fd9ac9f
07:28:18.065 [XNIO-3 I/O-6] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-6', selector sun.nio.ch.EPollSelectorImpl@23a4c73c
07:28:18.065 [XNIO-3 I/O-7] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-7', selector sun.nio.ch.EPollSelectorImpl@40a8f250
07:28:18.065 [XNIO-3 I/O-8] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 I/O-8', selector sun.nio.ch.EPollSelectorImpl@166576ae
07:28:18.065 [XNIO-3 Accept] DEBUG org.xnio.nio - Started channel thread 'XNIO-3 Accept', selector sun.nio.ch.EPollSelectorImpl@2752e26b
07:28:18.065 [Test worker] DEBUG io.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
07:28:18.074 [XNIO-3 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /multi (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], Content-Type=[multipart/form-data; boundary=wU9lrXnyAZ1n3BRp], Content-Length=[286], User-Agent=[Java/1.8.0_121], Host=[localhost:42799]}, cookies=[:]): --wU9lrXnyAZ1n3BRp
Content-Type: text/plain
Content-Disposition: form-data; name="filea"; filename="file-a.txt"

some-a-content
--wU9lrXnyAZ1n3BRp
Content-Type: text/plain
Content-Disposition: form-data; name="fileb"; filename="file-b.xtx"

some-b-content
--wU9lrXnyAZ1n3BRp-- }
07:28:18.076 [XNIO-3 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): ok
07:28:18.078 [Test worker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@a6ba357
07:28:18.082 [Test worker] DEBUG io.undertow - starting undertow server io.undertow.Undertow@54135d71
07:28:18.084 [XNIO-4 I/O-2] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-2', selector sun.nio.ch.EPollSelectorImpl@93bcd06
07:28:18.084 [XNIO-4 I/O-1] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-1', selector sun.nio.ch.EPollSelectorImpl@6df905ab
07:28:18.084 [XNIO-4 I/O-3] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-3', selector sun.nio.ch.EPollSelectorImpl@58a0b81c
07:28:18.084 [XNIO-4 I/O-4] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-4', selector sun.nio.ch.EPollSelectorImpl@1bb7721f
07:28:18.084 [XNIO-4 I/O-5] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-5', selector sun.nio.ch.EPollSelectorImpl@338b881
07:28:18.084 [XNIO-4 I/O-6] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-6', selector sun.nio.ch.EPollSelectorImpl@19b66b1c
07:28:18.084 [XNIO-4 I/O-7] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-7', selector sun.nio.ch.EPollSelectorImpl@33770299
07:28:18.085 [XNIO-4 I/O-8] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 I/O-8', selector sun.nio.ch.EPollSelectorImpl@1ceb8d14
07:28:18.085 [XNIO-4 Accept] DEBUG org.xnio.nio - Started channel thread 'XNIO-4 Accept', selector sun.nio.ch.EPollSelectorImpl@ce24e27
07:28:18.085 [Test worker] DEBUG io.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
07:28:18.094 [XNIO-4 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /multi (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], Content-Type=[multipart/form-data; boundary=myubYdkXAxoTgxLc], Content-Length=[286], User-Agent=[Java/1.8.0_121], Host=[localhost:38357]}, cookies=[:]): --myubYdkXAxoTgxLc
Content-Type: text/plain
Content-Disposition: form-data; name="filea"; filename="file-a.txt"

some-a-content
--myubYdkXAxoTgxLc
Content-Type: text/plain
Content-Disposition: form-data; name="fileb"; filename="file-b.xtx"

some-b-content
--myubYdkXAxoTgxLc-- }
07:28:18.099 [XNIO-4 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): ok
07:28:18.100 [Test worker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@54135d71
07:28:18.106 [Test worker] DEBUG io.undertow - starting undertow server io.undertow.Undertow@6c5e54fe
07:28:18.108 [XNIO-5 I/O-1] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-1', selector sun.nio.ch.EPollSelectorImpl@25930dde
07:28:18.108 [XNIO-5 I/O-3] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-3', selector sun.nio.ch.EPollSelectorImpl@1de0eb6d
07:28:18.108 [XNIO-5 I/O-4] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-4', selector sun.nio.ch.EPollSelectorImpl@480d9f3
07:28:18.108 [XNIO-5 I/O-2] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-2', selector sun.nio.ch.EPollSelectorImpl@e065761
07:28:18.108 [XNIO-5 I/O-5] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-5', selector sun.nio.ch.EPollSelectorImpl@7c3aef02
07:28:18.108 [XNIO-5 I/O-6] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-6', selector sun.nio.ch.EPollSelectorImpl@6e93d40e
07:28:18.108 [XNIO-5 I/O-7] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-7', selector sun.nio.ch.EPollSelectorImpl@2a3a13fe
07:28:18.108 [XNIO-5 I/O-8] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 I/O-8', selector sun.nio.ch.EPollSelectorImpl@35642486
07:28:18.108 [Test worker] DEBUG io.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
07:28:18.108 [XNIO-5 Accept] DEBUG org.xnio.nio - Started channel thread 'XNIO-5 Accept', selector sun.nio.ch.EPollSelectorImpl@2104aad9
07:28:18.115 [XNIO-5 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /multi (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], Content-Type=[multipart/form-data; boundary=Emvo56j4Vd9JVDmO], Content-Length=[286], User-Agent=[Java/1.8.0_121], Host=[localhost:42939]}, cookies=[:]): --Emvo56j4Vd9JVDmO
Content-Type: text/plain
Content-Disposition: form-data; name="filea"; filename="file-a.txt"

some-a-content
--Emvo56j4Vd9JVDmO
Content-Type: text/plain
Content-Disposition: form-data; name="fileb"; filename="file-b.xtx"

some-b-content
--Emvo56j4Vd9JVDmO-- }
07:28:18.118 [XNIO-5 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): ok
07:28:18.119 [Test worker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@6c5e54fe