File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .boot .web .embedded .netty ;
18
18
19
- import java .time .Duration ;
20
19
import java .util .Arrays ;
21
20
22
21
import org .junit .jupiter .api .Test ;
25
24
26
25
import org .springframework .boot .web .reactive .server .AbstractReactiveWebServerFactory ;
27
26
import org .springframework .boot .web .reactive .server .AbstractReactiveWebServerFactoryTests ;
28
- import org .springframework .boot .web .server .Compression ;
29
27
import org .springframework .boot .web .server .PortInUseException ;
30
- import org .springframework .http .ResponseEntity ;
31
- import org .springframework .web .reactive .function .client .WebClient ;
32
28
33
29
import static org .assertj .core .api .Assertions .assertThat ;
34
30
import static org .assertj .core .api .Assertions .assertThatExceptionOfType ;
@@ -87,15 +83,4 @@ void useForwardedHeaders() {
87
83
assertForwardHeaderIsUsed (factory );
88
84
}
89
85
90
- @ Test
91
- void noCompressionForResponseWithInvalidContentType () {
92
- Compression compression = new Compression ();
93
- compression .setEnabled (true );
94
- compression .setMimeTypes (new String [] { "application/json" });
95
- WebClient client = prepareCompressionTest (compression , "test~plain" );
96
- ResponseEntity <Void > response = client .get ().exchange ().flatMap ((res ) -> res .toEntity (Void .class ))
97
- .block (Duration .ofSeconds (30 ));
98
- assertResponseIsNotCompressed (response );
99
- }
100
-
101
86
}
Original file line number Diff line number Diff line change @@ -273,6 +273,17 @@ void noCompressionForUserAgent() {
273
273
assertResponseIsNotCompressed (response );
274
274
}
275
275
276
+ @ Test
277
+ void noCompressionForResponseWithInvalidContentType () {
278
+ Compression compression = new Compression ();
279
+ compression .setEnabled (true );
280
+ compression .setMimeTypes (new String [] { "application/json" });
281
+ WebClient client = prepareCompressionTest (compression , "test~plain" );
282
+ ResponseEntity <Void > response = client .get ().exchange ().flatMap ((res ) -> res .toEntity (Void .class ))
283
+ .block (Duration .ofSeconds (30 ));
284
+ assertResponseIsNotCompressed (response );
285
+ }
286
+
276
287
@ Test
277
288
void whenSslIsEnabledAndNoKeyStoreIsConfiguredThenServerFailsToStart () {
278
289
assertThatThrownBy (() -> testBasicSslWithKeyStore (null , null ))
You can’t perform that action at this time.
0 commit comments