Move back to JUnit 4 until SUREFIRE-1614 has been resolved
See gh-14736 See gh-14737 See gh-14738
This commit is contained in:
@@ -18,16 +18,19 @@ package sample.oauth2.resource;
|
||||
|
||||
import okhttp3.mockwebserver.MockResponse;
|
||||
import okhttp3.mockwebserver.MockWebServer;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class SampleReactiveOAuth2ResourceServerApplicationTests {
|
||||
|
||||
@@ -42,7 +45,7 @@ public class SampleReactiveOAuth2ResourceServerApplicationTests {
|
||||
+ "afU57cmK3KocTeknPAM_L716sCuSYGvDl6xUTXO7oPdrXhS_EhxLP6KxrpI1uD4Ea_5OWTh7S0Wx5LLDfU6wBG1DowN20d374zepOIEkR-Jnmr_Ql"
|
||||
+ "R44vmRqS5ncrF-1R0EGcPX49U6A";
|
||||
|
||||
@BeforeAll
|
||||
@BeforeClass
|
||||
public static void setup() throws Exception {
|
||||
server.start();
|
||||
String url = server.url("/.well-known/jwks.json").toString();
|
||||
@@ -50,7 +53,7 @@ public class SampleReactiveOAuth2ResourceServerApplicationTests {
|
||||
System.setProperty("spring.security.oauth2.resourceserver.jwt.jwk-set-uri", url);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@AfterClass
|
||||
public static void shutdown() throws Exception {
|
||||
server.shutdown();
|
||||
System.clearProperty("spring.security.oauth2.resourceserver.jwt.jwk-set-uri");
|
||||
|
||||
Reference in New Issue
Block a user