diff --git a/telemetry-core/src/main/java/com/newrelic/telemetry/SenderConfiguration.java b/telemetry-core/src/main/java/com/newrelic/telemetry/SenderConfiguration.java index 41f3b44a..a56ee796 100644 --- a/telemetry-core/src/main/java/com/newrelic/telemetry/SenderConfiguration.java +++ b/telemetry-core/src/main/java/com/newrelic/telemetry/SenderConfiguration.java @@ -154,7 +154,7 @@ public SenderConfigurationBuilder useLicenseKey(boolean useLicenseKey) { * @return this builder */ public SenderConfigurationBuilder setRegion(String region) throws IllegalArgumentException { - // Add IllegalArgumentException if region isn't US or EU + region = region.toUpperCase(); if (!region.equals("US") && !region.equals("EU")) { throw new IllegalArgumentException("The only supported regions are the US and EU regions"); diff --git a/telemetry-core/src/test/java/com/newrelic/telemetry/SenderConfigurationTest.java b/telemetry-core/src/test/java/com/newrelic/telemetry/SenderConfigurationTest.java index ae6d7aad..7e180466 100644 --- a/telemetry-core/src/test/java/com/newrelic/telemetry/SenderConfigurationTest.java +++ b/telemetry-core/src/test/java/com/newrelic/telemetry/SenderConfigurationTest.java @@ -49,20 +49,4 @@ void userProvidedEndpointTest() throws Exception { SenderConfiguration.builder(testURL, testPath).endpoint(testEndpointURL).build(); assertEquals(testEndpointURL, testConfig.getEndpointUrl()); } - - @Test - void defaultEndpointAsStringTest() throws Exception { - String endpointURLAsString = testURL + testPath; - SenderConfiguration testConfig = SenderConfiguration.builder(testURL, testPath).build(); - assertEquals(endpointURLAsString, testConfig.getEndpointUrl().toString()); - } - - @Test - void userEndpointAsStringTest() throws Exception { - URL testEndpointURL = new URL("https://google.com"); - String endpointURLAsString = "https://google.com"; - SenderConfiguration testConfig = - SenderConfiguration.builder(testURL, testPath).endpoint(testEndpointURL).build(); - assertEquals(endpointURLAsString, testConfig.getEndpointUrl().toString()); - } }