Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Change the default value of lastUpdateTime #77

Merged

Conversation

kaituo
Copy link
Member

@kaituo kaituo commented Apr 3, 2020

Issue #, if available:

Description of changes:

The PR does the following:

  1. Change the default value of lastUpdateTime from the current timestamp to null. Before the change, creating a detector returns one lastUpdateTime, while getting a detector returns a different lastUpdateTime. The difference is confusing to the user, and they may wonder what has happened between the creating and getting detector calls. After the change, creating a detector returns no last update time, while getting a detector returns a last update time.
  2. Replace the mocked threadpool in 2 tests with a real threadpool object.

Testing done:

  1. verified lastUpdateTime change in a cluster
  2. gradle build

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

… to null

1. Change the default value of lastUpdateTime from the current timestamp to null. Before the change, creating a detector returns one lastUpdateTime, while getting a detector returns a different lastUpdateTime. The difference is confusing to the user, and they may wonder what has happened between the creating and getting detector calls. After the change, creating a detector returns no last update time, while getting a detector returns a last update time.
2. Replace the mocked threadpool in 2 tests with a real threadpool object.

Testing done:
1. verified lastUpdateTime change in a cluster
2. gradle build
@kaituo kaituo self-assigned this Apr 3, 2020
@kaituo kaituo merged commit de3c931 into opendistro-for-elasticsearch:development Apr 9, 2020
kaituo added a commit to kaituo/anomaly-detection that referenced this pull request Apr 13, 2020
… to null (opendistro-for-elasticsearch#77)

1. Change the default value of lastUpdateTime from the current timestamp to null. Before the change, creating a detector returns one lastUpdateTime, while getting a detector returns a different lastUpdateTime. The difference is confusing to the user, and they may wonder what has happened between the creating and getting detector calls. After the change, creating a detector returns no last update time, while getting a detector returns a last update time.
2. Replace the mocked threadpool in 2 tests with a real threadpool object.

Testing done:
1. verified lastUpdateTime change in a cluster
2. gradle build
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants