Class groovyx.net.http.JavaHttpBuilderSpec

6

tests

0

failures

0

ignored

1.459s

duration

100%

successful

Tests

Test Duration Result
FromServer hasBody should return false when there is no content 0.101s passed
FromServer hasBody should return true when there is content 0.078s passed
Sending/Receiving JSON Data (POST) 0.146s passed
access to client implementation unsupported 0.031s passed
client customization unsupported 0.096s passed
client-specific configuration 1.007s passed

Standard output

06:24:50.788 [Test worker] DEBUG ersatz.jboss.logging - Logging Provider: ersatz.jboss.logging.Slf4jLoggerProvider
06:24:50.815 [Test worker] DEBUG ersatz.undertow - starting undertow server ersatz.undertow.Undertow@7f0b2da0
06:24:50.837 [Test worker] INFO ersatz.xnio - XNIO version 3.3.8.Final
06:24:50.895 [Test worker] INFO ersatz.xnio.nio - XNIO NIO Implementation Version 3.3.8.Final
06:24:51.013 [XNIO-1 I/O-1] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-1', selector sun.nio.ch.EPollSelectorImpl@3c904964
06:24:51.013 [XNIO-1 I/O-2] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-2', selector sun.nio.ch.EPollSelectorImpl@49c37f29
06:24:51.020 [XNIO-1 I/O-3] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-3', selector sun.nio.ch.EPollSelectorImpl@419d081d
06:24:51.030 [XNIO-1 I/O-6] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-6', selector sun.nio.ch.EPollSelectorImpl@540015b8
06:24:51.030 [XNIO-1 I/O-4] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-4', selector sun.nio.ch.EPollSelectorImpl@502fae68
06:24:51.030 [XNIO-1 I/O-7] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-7', selector sun.nio.ch.EPollSelectorImpl@5c09f7cc
06:24:51.031 [XNIO-1 I/O-8] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-8', selector sun.nio.ch.EPollSelectorImpl@1238ae1f
06:24:51.030 [XNIO-1 I/O-5] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 I/O-5', selector sun.nio.ch.EPollSelectorImpl@6a4a303b
06:24:51.034 [XNIO-1 Accept] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-1 Accept', selector sun.nio.ch.EPollSelectorImpl@3929c300
06:24:51.037 [Test worker] DEBUG ersatz.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
06:24:51.159 [Test worker] DEBUG groovyx.net.http.JavaHttpBuilder - Request-URI(GET): http://localhost:40091/foo
06:24:51.160 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Request-Header: Accept-Encoding -> [gzip, deflate]
06:24:51.372 [XNIO-1 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { GET /foo (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], User-Agent=[Java/1.8.0_131], Host=[localhost:40091]}, cookies=[:]): <empty> }
06:24:51.474 [XNIO-1 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): ok
06:24:51.519 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.content - Response-Body: ok
06:24:51.519 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Encoding -> gzip
06:24:51.519 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Connection -> keep-alive
06:24:51.519 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Type -> text/plain
06:24:51.519 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Length -> 22
06:24:51.520 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Date -> Mon, 20 Nov 2017 12:24:51 GMT
06:24:51.522 [Test worker] DEBUG ersatz.undertow - stopping undertow server ersatz.undertow.Undertow@7f0b2da0
06:24:51.531 [Test worker] DEBUG ersatz.undertow - starting undertow server ersatz.undertow.Undertow@45c1adb3
06:24:51.538 [XNIO-2 I/O-1] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-1', selector sun.nio.ch.EPollSelectorImpl@444ee366
06:24:51.540 [XNIO-2 I/O-2] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-2', selector sun.nio.ch.EPollSelectorImpl@3ea19c14
06:24:51.546 [XNIO-2 I/O-3] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-3', selector sun.nio.ch.EPollSelectorImpl@292d05d9
06:24:51.547 [XNIO-2 I/O-6] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-6', selector sun.nio.ch.EPollSelectorImpl@4532ec98
06:24:51.548 [XNIO-2 I/O-7] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-7', selector sun.nio.ch.EPollSelectorImpl@2c390754
06:24:51.550 [XNIO-2 I/O-8] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-8', selector sun.nio.ch.EPollSelectorImpl@4a1510a6
06:24:51.554 [Test worker] DEBUG ersatz.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
06:24:51.559 [Test worker] DEBUG ersatz.undertow - stopping undertow server ersatz.undertow.Undertow@45c1adb3
06:24:51.547 [XNIO-2 I/O-4] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-4', selector sun.nio.ch.EPollSelectorImpl@30ca4589
06:24:51.547 [XNIO-2 I/O-5] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 I/O-5', selector sun.nio.ch.EPollSelectorImpl@13632c19
06:24:51.554 [XNIO-2 Accept] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-2 Accept', selector sun.nio.ch.EPollSelectorImpl@351b1f4b
06:24:51.566 [Test worker] DEBUG ersatz.undertow - starting undertow server ersatz.undertow.Undertow@7eb40270
06:24:51.590 [XNIO-3 I/O-1] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-1', selector sun.nio.ch.EPollSelectorImpl@49d5c246
06:24:51.596 [XNIO-3 I/O-2] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-2', selector sun.nio.ch.EPollSelectorImpl@48f2be7a
06:24:51.603 [XNIO-3 I/O-3] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-3', selector sun.nio.ch.EPollSelectorImpl@44b42085
06:24:51.603 [XNIO-3 I/O-4] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-4', selector sun.nio.ch.EPollSelectorImpl@1c1377b3
06:24:51.618 [XNIO-3 I/O-6] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-6', selector sun.nio.ch.EPollSelectorImpl@6257013b
06:24:51.634 [XNIO-3 I/O-7] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-7', selector sun.nio.ch.EPollSelectorImpl@5911ab6
06:24:51.618 [XNIO-3 I/O-5] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-5', selector sun.nio.ch.EPollSelectorImpl@74d1c1f3
06:24:51.642 [XNIO-3 I/O-8] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 I/O-8', selector sun.nio.ch.EPollSelectorImpl@388cb4ca
06:24:51.646 [Test worker] DEBUG ersatz.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
06:24:51.646 [XNIO-3 Accept] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-3 Accept', selector sun.nio.ch.EPollSelectorImpl@4da2888e
06:24:51.657 [Test worker] DEBUG ersatz.undertow - stopping undertow server ersatz.undertow.Undertow@7eb40270
06:24:51.659 [Test worker] DEBUG ersatz.undertow - starting undertow server ersatz.undertow.Undertow@75ed1371
06:24:51.663 [XNIO-4 I/O-1] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-1', selector sun.nio.ch.EPollSelectorImpl@7def4ee0
06:24:51.670 [XNIO-4 I/O-2] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-2', selector sun.nio.ch.EPollSelectorImpl@57cd4419
06:24:51.678 [XNIO-4 I/O-3] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-3', selector sun.nio.ch.EPollSelectorImpl@5ea3da78
06:24:51.679 [XNIO-4 I/O-4] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-4', selector sun.nio.ch.EPollSelectorImpl@23fd0be
06:24:51.684 [XNIO-4 I/O-5] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-5', selector sun.nio.ch.EPollSelectorImpl@52338072
06:24:51.698 [XNIO-4 I/O-7] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-7', selector sun.nio.ch.EPollSelectorImpl@3676ff55
06:24:51.701 [XNIO-4 I/O-8] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-8', selector sun.nio.ch.EPollSelectorImpl@55c032f8
06:24:51.701 [XNIO-4 I/O-6] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 I/O-6', selector sun.nio.ch.EPollSelectorImpl@1149a9a1
06:24:51.710 [Test worker] DEBUG ersatz.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
06:24:51.710 [XNIO-4 Accept] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-4 Accept', selector sun.nio.ch.EPollSelectorImpl@75eb098f
06:24:51.729 [Test worker] DEBUG groovyx.net.http.JavaHttpBuilder - Request-URI(POST): http://localhost:45927/foo
06:24:51.730 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Request-Header: Accept-Encoding -> [gzip, deflate]
06:24:51.754 [XNIO-4 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /foo (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], User-Agent=[Java/1.8.0_131], Host=[localhost:45927]}, cookies=[:]): <empty> }
06:24:51.755 [XNIO-4 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({}): <empty>
06:24:51.755 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.content - Response-Body: null
06:24:51.755 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Connection -> keep-alive
06:24:51.755 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Length -> 0
06:24:51.755 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Date -> Mon, 20 Nov 2017 12:24:51 GMT
06:24:51.757 [Test worker] DEBUG ersatz.undertow - stopping undertow server ersatz.undertow.Undertow@75ed1371
06:24:51.759 [Test worker] DEBUG ersatz.undertow - starting undertow server ersatz.undertow.Undertow@1f3601d9
06:24:51.761 [XNIO-5 I/O-1] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-1', selector sun.nio.ch.EPollSelectorImpl@72974c01
06:24:51.782 [XNIO-5 I/O-3] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-3', selector sun.nio.ch.EPollSelectorImpl@424188e1
06:24:51.786 [XNIO-5 I/O-4] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-4', selector sun.nio.ch.EPollSelectorImpl@42d23a50
06:24:51.786 [XNIO-5 I/O-5] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-5', selector sun.nio.ch.EPollSelectorImpl@5d930be1
06:24:51.790 [XNIO-5 I/O-2] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-2', selector sun.nio.ch.EPollSelectorImpl@34744b01
06:24:51.794 [XNIO-5 I/O-6] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-6', selector sun.nio.ch.EPollSelectorImpl@2a2b73c8
06:24:51.796 [XNIO-5 I/O-7] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-7', selector sun.nio.ch.EPollSelectorImpl@42f039aa
06:24:51.798 [XNIO-5 I/O-8] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 I/O-8', selector sun.nio.ch.EPollSelectorImpl@7b35cb29
06:24:51.802 [Test worker] DEBUG ersatz.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
06:24:51.802 [XNIO-5 Accept] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-5 Accept', selector sun.nio.ch.EPollSelectorImpl@160f7768
06:24:51.824 [Test worker] INFO TESTING - Configuration: POST->http://localhost:46019/foo
06:24:51.825 [Test worker] DEBUG groovyx.net.http.JavaHttpBuilder - Request-URI(POST): http://localhost:46019/foo
06:24:51.825 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Request-Header: Accept-Encoding -> [gzip, deflate]
06:24:51.827 [XNIO-5 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Request: { POST /foo (query=[:], headers={Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2], Connection=[keep-alive], Accept-Encoding=[gzip, deflate], User-Agent=[Java/1.8.0_131], Host=[localhost:46019]}, cookies=[:]): <empty> }
06:24:51.833 [XNIO-5 task-1] DEBUG com.stehno.ersatz.ErsatzServer - Response({Content-Type=[text/plain]}): OK
06:24:51.834 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.content - Response-Body: OK
06:24:51.834 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Encoding -> gzip
06:24:51.834 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Connection -> keep-alive
06:24:51.834 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Type -> text/plain
06:24:51.834 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Length -> 22
06:24:51.834 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Date -> Mon, 20 Nov 2017 12:24:51 GMT
06:24:51.835 [Test worker] DEBUG ersatz.undertow - stopping undertow server ersatz.undertow.Undertow@1f3601d9
06:24:51.838 [Test worker] DEBUG ersatz.undertow - starting undertow server ersatz.undertow.Undertow@36e0ddaf
06:24:51.841 [XNIO-6 I/O-1] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-1', selector sun.nio.ch.EPollSelectorImpl@6bf187e3
06:24:51.841 [XNIO-6 I/O-2] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-2', selector sun.nio.ch.EPollSelectorImpl@34772bfc
06:24:51.854 [XNIO-6 I/O-3] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-3', selector sun.nio.ch.EPollSelectorImpl@1579c265
06:24:51.854 [XNIO-6 I/O-4] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-4', selector sun.nio.ch.EPollSelectorImpl@b2cfc68
06:24:51.858 [XNIO-6 I/O-5] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-5', selector sun.nio.ch.EPollSelectorImpl@73aad57a
06:24:51.870 [XNIO-6 I/O-7] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-7', selector sun.nio.ch.EPollSelectorImpl@67fffb7d
06:24:51.870 [XNIO-6 I/O-6] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-6', selector sun.nio.ch.EPollSelectorImpl@eab1ad5
06:24:51.886 [XNIO-6 I/O-8] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 I/O-8', selector sun.nio.ch.EPollSelectorImpl@576b41df
06:24:51.902 [Test worker] DEBUG ersatz.undertow - Configuring listener with protocol HTTP for interface localhost and port 0
06:24:51.903 [XNIO-6 Accept] DEBUG ersatz.xnio.nio - Started channel thread 'XNIO-6 Accept', selector sun.nio.ch.EPollSelectorImpl@7219d2f2
06:24:51.915 [Test worker] DEBUG groovyx.net.http.JavaHttpBuilder - Request-URI(POST): http://httpbin.org/post
06:24:51.916 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Request-Header: Accept-Encoding -> [gzip, deflate]
06:24:51.916 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Request-Header: Content-Type -> [application/json; charset=utf-8]
06:24:51.916 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.content - Request-Body(application/json): {"item":"ASDFASEACV235","score":90786}
06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.content - Response-Body: {
  "args": {}, 
  "data": "{\"item\":\"ASDFASEACV235\",\"score\":90786}", 
  "files": {}, 
  "form": {}, 
  "headers": {
    "Accept": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2", 
    "Accept-Encoding": "gzip, deflate", 
    "Connection": "close", 
    "Content-Length": "38", 
    "Content-Type": "application/json; charset=utf-8", 
    "Host": "httpbin.org", 
    "User-Agent": "Java/1.8.0_131"
  }, 
  "json": {
    "item": "ASDFASEACV235", 
    "score": 90786
  }, 
  "origin": "76.186.120.225", 
  "url": "http://httpbin.org/post"
}

06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Connection -> keep-alive
06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Server -> meinheld/0.6.1
06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Date -> Mon, 20 Nov 2017 12:24:51 GMT
06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Type -> application/json
06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Access-Control-Allow-Origin -> *
06:24:51.980 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Access-Control-Allow-Credentials -> true
06:24:51.981 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: X-Powered-By -> Flask
06:24:51.981 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: X-Processed-Time -> 0.0023410320282
06:24:51.981 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Content-Length -> 551
06:24:51.981 [Test worker] DEBUG groovy.net.http.JavaHttpBuilder.headers - Response-Header: Via -> 1.1 vegur
06:24:51.982 [Test worker] DEBUG ersatz.undertow - stopping undertow server ersatz.undertow.Undertow@36e0ddaf