Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.6.x] Make elastic tests independent of the time #10446

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 17, 2025

This is an automatic copy of pull request #10435 done by Mergify.


Description

Some of the tests of the elastic repository depend on the time when they are executed. This commit introduces a TimeProvider class that is used to provide the same date for both the data put in ES and the tests themselves.


Cherry-pick of 94b9e2a has failed:

On branch mergify/bp/4.6.x/pr-10435
Your branch is up to date with 'origin/4.6.x'.

You are currently cherry-picking commit 94b9e2a9c9.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/DatabaseHydrator.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/TestConfiguration.java
	new file:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/TimeProvider.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/analytics/ElasticsearchAnalyticsRepositoryTest.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/v4/log/LogElasticsearchRepositoryTest.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/log.ftl
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/monitor.ftl
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/request.ftl

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/health.ftl

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


📚  View the storybook of this branch here

@mergify mergify bot added the conflicts label Jan 17, 2025
@mergify mergify bot requested a review from a team as a code owner January 17, 2025 08:23
@mergify mergify bot assigned phiz71 Jan 17, 2025
Copy link
Contributor Author

mergify bot commented Jan 17, 2025

Cherry-pick of 94b9e2a has failed:

On branch mergify/bp/4.6.x/pr-10435
Your branch is up to date with 'origin/4.6.x'.

You are currently cherry-picking commit 94b9e2a9c9.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/DatabaseHydrator.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/TestConfiguration.java
	new file:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/TimeProvider.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/analytics/ElasticsearchAnalyticsRepositoryTest.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/java/io/gravitee/repository/elasticsearch/v4/log/LogElasticsearchRepositoryTest.java
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/log.ftl
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/monitor.ftl
	modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/request.ftl

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   gravitee-apim-repository/gravitee-apim-repository-elasticsearch/src/test/resources/freemarker/health.ftl

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Some of the tests of the elastic repository depend on the time when they are executed.
This commit introduces a TimeProvider class that is used to provide the same date for both the data put in ES and the tests themselves.

(cherry picked from commit 94b9e2a)
@phiz71 phiz71 force-pushed the mergify/bp/4.6.x/pr-10435 branch from 34a4b65 to bad1259 Compare January 17, 2025 09:39
@phiz71 phiz71 removed the conflicts label Jan 17, 2025
@phiz71 phiz71 enabled auto-merge (rebase) January 17, 2025 09:41
@phiz71 phiz71 merged commit e2186c9 into 4.6.x Jan 17, 2025
38 of 39 checks passed
@phiz71 phiz71 deleted the mergify/bp/4.6.x/pr-10435 branch January 17, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant