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

Bugfix/task added twice #543

Merged
merged 7 commits into from
Jan 30, 2023
Merged

Bugfix/task added twice #543

merged 7 commits into from
Jan 30, 2023

Conversation

mcornaton
Copy link
Contributor

No description provided.

execution.get(1, TimeUnit.MINUTES);
} catch (ExecutionException e) {
if (e.getCause() instanceof DuplicateKeyException) {
fail("Task has been added twice. Should not happen!");
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this can happen 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. This should not happen anymore. However, I'd like to keep it there. This would ensure that, if we ever refactor TaskService#addTask, we still handle such a case.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree. Shouldn't we try to check the addTask method returns the correct value as well ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see this other PR: #547

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@jeremyjams jeremyjams left a comment

Choose a reason for hiding this comment

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

👍

@mcornaton mcornaton merged commit d8e93fb into develop Jan 30, 2023
@mcornaton mcornaton deleted the bugfix/task-added-twice branch January 30, 2023 15:54
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