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

1282-GetSettingsLookupRaceFix: Test #1283

Merged
merged 2 commits into from Oct 9, 2023
Merged

Conversation

rmadsen-ks
Copy link
Collaborator

@rmadsen-ks rmadsen-ks commented Oct 9, 2023

  • Fixed the issue by using ImmutableDictionary.SetItem instead of ImmutableDictionary.Add.
    The difference is that SetItem updates values of existing keys while Add throws an exception if the key exists in the dictionary.

  • Added unit test to show the issue.

Close #1282

Added unit test to show the issue.
@rmadsen-ks rmadsen-ks self-assigned this Oct 9, 2023
Fixed the issue by using ImmutableDictionary.SetItem instead of ImmutableDictionary.Add.

The difference is that SetItem updates values of existing keys while Add throws an exception if the key exists in the dictionary.
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:07 — with GitHub Actions Inactive
@rmadsen-ks rmadsen-ks assigned alnlarsen and unassigned rmadsen-ks Oct 9, 2023
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:11 — with GitHub Actions Inactive
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:11 — with GitHub Actions Inactive
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:13 — with GitHub Actions Inactive
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:13 — with GitHub Actions Inactive
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:13 — with GitHub Actions Inactive
@rmadsen-ks rmadsen-ks temporarily deployed to sign October 9, 2023 09:14 — with GitHub Actions Inactive
Copy link
Collaborator

@alnlarsen alnlarsen left a comment

Choose a reason for hiding this comment

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

Looks good, lgtm

@rmadsen-ks rmadsen-ks merged commit f8e45aa into main Oct 9, 2023
36 checks passed
@rmadsen-ks rmadsen-ks deleted the 1282-GetSettingsLookupRaceFix branch October 9, 2023 09:29
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

This change is part of OpenTAP version 9.22.0-beta.54+f8e45aaf or later.

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.

Race Condition in GetSettingsLookup
2 participants