epugh commented on code in PR #3154: URL: https://github.com/apache/solr/pull/3154#discussion_r1940367902
########## solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java: ########## @@ -1064,43 +1065,37 @@ public void testAKSTZone() throws IOException { final String inputString = "Thu Nov 13 04:35:51 AKST 2008"; // asctime + timezone1 final long expectTs = 1226583351000L; - assertEquals( - expectTs, - DateTimeFormatter.ofPattern(dateFormat, Locale.ENGLISH) - .withZone(ZoneId.of("UTC")) - .parse(inputString, Instant::from) - .toEpochMilli()); - // ensure english locale and root locale return the same date - assertEquals( - expectTs + "", - DateTimeFormatter.ofPattern(dateFormat, Locale.ENGLISH) - .withZone(ZoneId.of("UTC")) - .parse(inputString, Instant::from) - .toEpochMilli(), - DateTimeFormatter.ofPattern(dateFormat, Locale.ROOT) - .withZone(ZoneId.of("UTC")) - .parse(inputString, Instant::from) - .toEpochMilli()); + try { + // ensure english locale and root locale return the same date + assertEquals( + expectTs, + DateTimeFormatter.ofPattern(dateFormat, Locale.ENGLISH) + .withZone(ZoneId.of("UTC")) + .parse(inputString, Instant::from) + .toEpochMilli()); + + assertEquals( + expectTs, + DateTimeFormatter.ofPattern(dateFormat, Locale.ROOT) + .withZone(ZoneId.of("UTC")) + .parse(inputString, Instant::from) + .toEpochMilli()); + } catch (DateTimeParseException e) { + // If the JVM's java.locale.providers can't parse these, there is no hope of this test passing + assumeNoException("JVM's Locale provider is incompatible with this test", e); + } assertParsedDate( inputString, Date.from(Instant.ofEpochMilli(expectTs)), "parse-date-patterns-default-config"); - // A bug in Java 9 (not in 8) causes this to fail! (not fixed yet?!) Review Comment: nice clean up ########## solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java: ########## @@ -295,12 +295,12 @@ public void testBasicAuth() throws Exception { verifySecurityStatus(cl, baseUrl + "/admin/info/key", "key", NOT_NULL_PREDICATE, 20); assertAuthMetricsMinimums(17, 8, 8, 1, 0, 0); - String[] toolArgs = new String[] {"status", "--solr-url", baseUrl}; + String[] toolArgs = + new String[] {"status", "--solr-url", baseUrl, "--credentials", "harry:HarryIsUberCool"}; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream stdoutSim = new PrintStream(baos, true, StandardCharsets.UTF_8.name()); StatusTool tool = new StatusTool(stdoutSim); try { - System.setProperty("basicauth", "harry:HarryIsUberCool"); Review Comment: any chance that this pattern shows up anywhere else and or is suggested in docs? Magic system variable? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org