spring-data-examples icon indicating copy to clipboard operation
spring-data-examples copied to clipboard

Add elasticsearch repository test

Open puppylpg opened this issue 1 year ago • 2 comments

  • [x] You have read the Spring Data contribution guidelines.
  • [x] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • [x] You submit test cases (unit or integration tests) that back your changes.
  • [x] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).
  1. Add elasticsearch repository test cases;
  2. Fix: use LocalDate rather than String type to match the annotation @Field(type = Date). The former String type is a misuse of date type and will cause the following warn:
    WARN  org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchPersistentProperty - Unsupported type 'class java.lang.String' for date property 'date'.
    
  3. Use singleton containers when testing using testcontainers;

puppylpg avatar Jan 23 '24 08:01 puppylpg

@sothawo what do you think?

mp911de avatar Sep 09 '24 08:09 mp911de

I will have a look, but cannot do this before the next weekend

sothawo avatar Sep 09 '24 11:09 sothawo

Closing as this pull request wasn't updated in time. If you would like us to look at this issue, please provide additional information and we will re-open the issue.

mp911de avatar Nov 11 '24 10:11 mp911de

Sorry for the late response. The code has been modified according to the review suggestions.

puppylpg avatar Nov 17 '24 16:11 puppylpg