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

NRPT-262: Associating mine records. Fixing unit tests, code cleanup. #544

Merged
merged 4 commits into from
Aug 14, 2020

Conversation

marklise
Copy link
Contributor

The main part of this bug was to add associated mine records. This changes how the project and mine selectors work by assigning the dropdown value to either form element as long as the record is an nrpti source.

There is now a service that pulls the epic project list and mine list from the back-end on an interval and stuffs it into the storage service. The storage service emits this so that we can subscribe to the change and update the UI without requiring a page load.

The task expanded into discovering a slew of issues w.r.t tests and discovering race conditions in running them, and just finding and fixing a whole lot of things. I found sometimes they would fail, and sometimes they would pass. Usually the first run would pass, and the second run would fail (and then alternate pass/fail/pass/fail). I could split them out but there are so many changes and most are originating from a bad initial copy-paste that got replicated all over the place.

The unit tests we have mostly only bootstrap the test, but in fixing and cleaning them up this should save time for others in making them actually useful.

@danieltruong
Copy link

Not sure if this is a problem:

  • Go to any record that has a mine guid set.
  • Set mine guid to none and save.
  • Mine guid is not removed.

@sonarcloud
Copy link

sonarcloud bot commented Aug 14, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@mtCarto mtCarto 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, tried few test runs to confirm the race condition was resolved. 👍

@marklise marklise merged commit faf4d4e into bcgov:master Aug 14, 2020
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.

4 participants