ajschmidt commented on a change in pull request #2785: In Traffic Router 
Support Snapshots which only update Delivery Services
URL: https://github.com/apache/trafficcontrol/pull/2785#discussion_r241810569
 
 

 ##########
 File path: 
traffic_router/core/src/test/java/com/comcast/cdn/traffic_control/traffic_router/core/config/ConfigHandlerTest.java
 ##########
 @@ -279,41 +279,42 @@ public void parseRegionalGeoConfig() throws Exception {
                
when(snapshotEventsProcessor.getUpdateEvents()).thenReturn(empty);
                Whitebox.invokeMethod(handler, "parseRegionalGeoConfig", 
config, snapshotEventsProcessor);
                verify(rgu, times(2)).setDataBaseURL(eq(url),eq(interval ));
-       };
+       }
 
     @Test
     public void testParseLocalizationMethods() throws Exception {
-        LocalizationMethod[] allMethods = new LocalizationMethod[] {
-                LocalizationMethod.CZ,
-                LocalizationMethod.DEEP_CZ,
-                LocalizationMethod.GEO,
-        };
-        Set<LocalizationMethod> expected = new HashSet<>();
-        expected.addAll(Arrays.asList(allMethods));
-
-        ObjectMapper mapper = new ObjectMapper();
-
-        String allMethodsString = "{\"localizationMethods\": 
[\"CZ\",\"DEEP_CZ\",\"GEO\"]}";
-        JsonNode allMethodsJson = mapper.readTree(allMethodsString);
-        Set<LocalizationMethod> actual = Whitebox.invokeMethod(handler, 
"parseLocalizationMethods", "foo", allMethodsJson);
-        assertThat(actual, equalTo(expected));
-
-        String noMethodsString = "{}";
-        JsonNode noMethodsJson = mapper.readTree(noMethodsString);
-        actual = Whitebox.invokeMethod(handler, "parseLocalizationMethods", 
"foo", noMethodsJson);
-        assertThat(actual, equalTo(expected));
-
-        String nullMethodsString = "{\"localizationMethods\": null}";
-        JsonNode nullMethodsJson = mapper.readTree(nullMethodsString);
-        actual = Whitebox.invokeMethod(handler, "parseLocalizationMethods", 
"foo", nullMethodsJson);
-        assertThat(actual, equalTo(expected));
-
-        String CZMethodsString = "{\"localizationMethods\": [\"CZ\"]}";
-        JsonNode CZMethodsJson = mapper.readTree(CZMethodsString);
-        expected.clear();
-        expected.add(LocalizationMethod.CZ);
-        actual = Whitebox.invokeMethod(handler, "parseLocalizationMethods", 
"foo", CZMethodsJson);
-        assertThat(actual, equalTo(expected));
+           LocalizationMethod[] allMethods = new LocalizationMethod[]{
 
 Review comment:
   done

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to