diff --git a/usergw-service/src/test/java/cn/ecpark/service/usergw/utils/TestYaml.java b/usergw-service/src/test/java/cn/ecpark/service/usergw/utils/TestYaml.java index 2504ae9..c3f0c32 100644 --- a/usergw-service/src/test/java/cn/ecpark/service/usergw/utils/TestYaml.java +++ b/usergw-service/src/test/java/cn/ecpark/service/usergw/utils/TestYaml.java @@ -20,7 +20,7 @@ public class TestYaml { String[] gatewayConfigPathList = { "test-gateway.yml", "test-gateway.yaml", "test-Gateway.yml", "test-Gateway.yaml" }; for (String gatewayConfigPath : gatewayConfigPathList) { - inputStream = this.getClass().getResourceAsStream(gatewayConfigPath); + inputStream = this.getClass().getClassLoader().getResourceAsStream(gatewayConfigPath); if (inputStream != null) { break; } @@ -42,7 +42,7 @@ public class TestYaml { Assert.assertEquals(defaultFilters.size(), 1); Assert.assertEquals(defaultFilters.getClass(), ArrayList.class); - Assert.assertEquals(defaultFilters.get(0), "AddResponseHeader=X-Response-Default-Foo, Default-Bar"); + Assert.assertEquals(defaultFilters.get(0), "AddResponseHeader=X-Response-Default-Foo, Test-Default-Bar"); } } \ No newline at end of file