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

Hotfix/initialization checks #444

Merged
merged 4 commits into from
Oct 18, 2021
Merged

Conversation

jeremyjams
Copy link
Member

  • Added checks before upgrading locally to initialized status
  • Removed 2-blocks waiting time before supplying new replicate
  • Minor logs update

@jeremyjams jeremyjams requested a review from a team October 18, 2021 07:59
Comment on lines +510 to +511
assertThat(task.getDateStatusList().get(task.getDateStatusList().size() - 1).getStatus()).isEqualTo(INITIALIZING);
assertThat(task.getCurrentStatus()).isEqualTo(INITIALIZING);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't those 2 lines redundant? It looks like we are sure that the last status in the dateStatusList is equal to the current status.
(That's enforced in Task class so I'm not sure we should test it here.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point yes, I might say current version helps reading. Let's take this example:

        assertThat(task.getDateStatusList().get(task.getDateStatusList().size() - 3).getStatus()).isEqualTo(RECEIVED);
        assertThat(task.getDateStatusList().get(task.getDateStatusList().size() - 2).getStatus()).isEqualTo(INITIALIZING);
        assertThat(task.getDateStatusList().get(task.getDateStatusList().size() - 1).getStatus()).isEqualTo(INITIALIZED);
        assertThat(task.getCurrentStatus()).isEqualTo(INITIALIZED);
  1. Last assertion helps reading quickly what's the targeted status at the end.
  2. Three first assertions are kind of optional tests checking status orders, easy to read them out in one block.

Anyway, if we can discuss on that, I don't feel confident with refactoring these tests in this hotfix PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'm OK with that. Thanks!

Copy link
Member

@zguesmi zguesmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, thanks!

@jeremyjams jeremyjams requested a review from mcornaton October 18, 2021 09:12
@mcornaton
Copy link
Contributor

Ok for me, thanks!

@jeremyjams jeremyjams merged commit 1562e09 into master Oct 18, 2021
@jeremyjams jeremyjams deleted the hotfix/initialization-checks branch October 18, 2021 13:09
@jeremyjams jeremyjams restored the hotfix/initialization-checks branch October 18, 2021 14:18
@jeremyjams jeremyjams deleted the hotfix/initialization-checks branch October 19, 2021 08:26
@jeremyjams jeremyjams restored the hotfix/initialization-checks branch October 19, 2021 08:29
@jeremyjams jeremyjams deleted the hotfix/initialization-checks branch October 19, 2021 08:42
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.

3 participants