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

CMR-10323: Int test periodically failing #2208

Merged
merged 2 commits into from
Jan 27, 2025
Merged

CMR-10323: Int test periodically failing #2208

merged 2 commits into from
Jan 27, 2025

Conversation

jmaeng72
Copy link
Contributor

@jmaeng72 jmaeng72 commented Jan 14, 2025

Overview

What is the feature/fix?

Int test periodically failing

What is the Solution?

Caches needed to be refreshed and tests did not wait long enough sometimes for it to complete in the backend. Increased time to wait to give caches enough time to fully refresh

What areas of the application does this impact?

Int tests

Checklist

  • I have updated/added unit and int tests that prove my fix is effective or that my feature works
  • New and existing unit and int tests pass locally and remotely
  • clj-kondo has been run locally and all errors corrected
  • I have removed unnecessary/dead code and imports in files I have changed
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have cleaned up integration tests by doing one or more of the following:
    • migrated any are2 tests to are3 in files I have changed
    • de-duped, consolidated, removed dead int tests
    • transformed applicable int tests into unit tests
    • refactored to reduce number of system state resets by updating fixtures (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each

concept (dissoc (d/item->concept coll1) :revision-id)]
(ingest/update-ingest-provider {:provider-id "PROV1"
:short-name "PROV1"
:cmr-only false
:small false})
(ingest/clear-caches)
(Thread/sleep 3000)
Copy link
Contributor

@eereiter eereiter Jan 14, 2025

Choose a reason for hiding this comment

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

Oh well - an increase in testing time - here and for other tests. But this still could break if the tests are running slow? Can clear-caches be made synchronous or is there a way to tell when the cache is clear? Or are we waiting on something else? Why do we have to wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the errors were coming from the kms cache not reseting and so we got a lot of validation errors. I'm sure we could create another func or update this one to make clear-cache synchronous but it is attached to a func that is clearing all the dev-system caches at once.

And yes the test could potentially fail if 3 seconds is not long enough to wait for all the caches to refresh

@jmaeng72 jmaeng72 merged commit 8b71d4c into master Jan 27, 2025
6 checks passed
@jmaeng72 jmaeng72 deleted the CMR-10323 branch January 27, 2025 15:52
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