From 5c4dd1d2db8668d913bd8593af5d353cbb45bd0d Mon Sep 17 00:00:00 2001 From: Arnaud Gourlay Date: Sat, 9 Dec 2023 14:33:05 +0100 Subject: [PATCH] do not force gzip by default as it is kinda slow and not necessary on small test payload --- .../agourlay/cornichon/core/Config.scala | 2 +- .../superHeroes/SuperHeroesScenario.scala | 28 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/cornichon-core/src/main/scala/com/github/agourlay/cornichon/core/Config.scala b/cornichon-core/src/main/scala/com/github/agourlay/cornichon/core/Config.scala index 351afab7..c95d5164 100644 --- a/cornichon-core/src/main/scala/com/github/agourlay/cornichon/core/Config.scala +++ b/cornichon-core/src/main/scala/com/github/agourlay/cornichon/core/Config.scala @@ -13,7 +13,7 @@ case class Config( traceRequests: Boolean = false, warnOnDuplicateHeaders: Boolean = false, failOnDuplicateHeaders: Boolean = false, - addAcceptGzipByDefault: Boolean = true, + addAcceptGzipByDefault: Boolean = false, // kinda slow disableCertificateVerification: Boolean = false, followRedirect: Boolean = false, enableHttp2: Boolean = false) diff --git a/cornichon-test-framework/src/test/scala/com/github/agourlay/cornichon/framework/examples/superHeroes/SuperHeroesScenario.scala b/cornichon-test-framework/src/test/scala/com/github/agourlay/cornichon/framework/examples/superHeroes/SuperHeroesScenario.scala index 2bc679e0..33deb6f8 100644 --- a/cornichon-test-framework/src/test/scala/com/github/agourlay/cornichon/framework/examples/superHeroes/SuperHeroesScenario.scala +++ b/cornichon-test-framework/src/test/scala/com/github/agourlay/cornichon/framework/examples/superHeroes/SuperHeroesScenario.scala @@ -262,34 +262,6 @@ class SuperHeroesScenario extends CornichonFeature { Then assert status.isClientError } - Scenario("demonstrate Gzip support") { - - RepeatWith("application/json", "gzip", "deflate")("encoding") { - - When I get("/superheroes/Batman").withParams("sessionId" -> "").withHeaders( - "Accept-Encoding" -> "" - ) - - Then assert status.is(200) - - And assert body.is( - """ - { - "name": "Batman", - "realName": "Bruce Wayne", - "city": "Gotham city", - "hasSuperpowers": false, - "publisher":{ - "name":"DC", - "foundationYear":1934, - "location":"Burbank, California" - } - } - """ - ) - } - } - Scenario("demonstrate collection features") { When I get("/superheroes").withParams("sessionId" -> "")