Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/428#discussion_r207724560
--- Diff:
solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java
---
@@ -171,36 +162,36 @@ public void testParseUSPacificDate() throws Exception
{
doc(f("id", "288"),
f("not_in_schema", dateString)));
assertNotNull(d);
assertTrue(d.getFieldValue("not_in_schema") instanceof Date);
- assertEquals(dateStringUTC,
- (new
DateTime(((Date)d.getFieldValue("not_in_schema")).getTime(),DateTimeZone.UTC)).toString());
+ assertEquals(dateStringUTC,
+
(ZonedDateTime.ofInstant(((Date)d.getFieldValue("not_in_schema")).toInstant(),
ZoneOffset.UTC)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ",
Locale.ROOT)));
}
public void testParseDateFormats() throws Exception {
String[] formatExamples = {
--- End diff --
I just realized these formats are duplicated identically from the config
file -- large code duplication :-( A comment that this is the case would be
helpful to reviewers.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]