|
46 | 46 | import org.elasticsearch.search.sort.SortOrder; |
47 | 47 | import org.elasticsearch.test.ESIntegTestCase; |
48 | 48 | import org.elasticsearch.test.InternalSettingsPlugin; |
49 | | -import org.joda.time.DateTime; |
50 | | -import org.joda.time.DateTimeZone; |
| 49 | +import org.joda.time.base.BaseDateTime; |
51 | 50 |
|
52 | 51 | import java.time.ZoneOffset; |
53 | 52 | import java.time.ZonedDateTime; |
@@ -702,7 +701,6 @@ public void testSingleValueFieldDatatField() throws ExecutionException, Interrup |
702 | 701 | assertThat(fields.get("test_field").getValue(), equalTo("foobar")); |
703 | 702 | } |
704 | 703 |
|
705 | | - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/31992") |
706 | 704 | public void testDocValueFields() throws Exception { |
707 | 705 | createIndex("test"); |
708 | 706 |
|
@@ -804,8 +802,8 @@ public void testDocValueFields() throws Exception { |
804 | 802 | assertThat(searchResponse.getHits().getAt(0).getFields().get("long_field").getValue(), equalTo((Object) 4L)); |
805 | 803 | assertThat(searchResponse.getHits().getAt(0).getFields().get("float_field").getValue(), equalTo((Object) 5.0)); |
806 | 804 | assertThat(searchResponse.getHits().getAt(0).getFields().get("double_field").getValue(), equalTo((Object) 6.0d)); |
807 | | - assertThat(searchResponse.getHits().getAt(0).getFields().get("date_field").getValue(), |
808 | | - equalTo(new DateTime(date.toInstant().toEpochMilli(), DateTimeZone.UTC))); |
| 805 | + BaseDateTime dateField = searchResponse.getHits().getAt(0).getFields().get("date_field").getValue(); |
| 806 | + assertThat(dateField.getMillis(), equalTo(date.toInstant().toEpochMilli())); |
809 | 807 | assertThat(searchResponse.getHits().getAt(0).getFields().get("boolean_field").getValue(), equalTo((Object) true)); |
810 | 808 | assertThat(searchResponse.getHits().getAt(0).getFields().get("text_field").getValue(), equalTo("foo")); |
811 | 809 | assertThat(searchResponse.getHits().getAt(0).getFields().get("keyword_field").getValue(), equalTo("foo")); |
|
0 commit comments