Browse Source

Adjust Test Assertion

- Netty returns a slightly different exception on Windows,
so adjusted assertion accordingly.

Issue gh-9421
Josh Cummings 4 years ago
parent
commit
02d017abf7

+ 2 - 2
oauth2/oauth2-jose/src/test/java/org/springframework/security/oauth2/jwt/NimbusReactiveJwtDecoderTests.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -138,7 +138,7 @@ public class NimbusReactiveJwtDecoderTests {
 		// @formatter:off
 		assertThatIllegalStateException()
 				.isThrownBy(() -> this.decoder.decode(this.messageReadToken).block())
-				.withRootCauseInstanceOf(UnknownHostException.class);
+				.withStackTraceContaining(UnknownHostException.class.getName());
 		// @formatter:on
 	}