Skip to content

Commit d3000a2

Browse files
author
Dave Syer
committed
Fix ordering problem with Zuul tests
1 parent 1fe28af commit d3000a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/web/ZuulHandlerMappingTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
package org.springframework.cloud.netflix.zuul.web;
1818

19+
import static org.junit.Assert.assertNotNull;
20+
import static org.junit.Assert.assertNull;
21+
1922
import java.util.Arrays;
2023

2124
import org.junit.Before;
@@ -25,8 +28,7 @@
2528
import org.springframework.cloud.netflix.zuul.filters.RouteLocator;
2629
import org.springframework.mock.web.MockHttpServletRequest;
2730

28-
import static org.junit.Assert.assertNotNull;
29-
import static org.junit.Assert.assertNull;
31+
import com.netflix.zuul.context.RequestContext;
3032

3133
/**
3234
* @author Dave Syer
@@ -43,6 +45,7 @@ public class ZuulHandlerMappingTests {
4345

4446
@Before
4547
public void init() {
48+
RequestContext.getCurrentContext().clear();
4649
this.mapping = new ZuulHandlerMapping(this.locator, new ZuulController());
4750
this.mapping.setErrorController(this.errors);
4851
Mockito.when(this.errors.getErrorPath()).thenReturn("/error");

0 commit comments

Comments
 (0)