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

Many revisions fixtures have nid = 1 and are causing intermittent test failures #8864

Closed
jywarren opened this issue Dec 16, 2020 · 1 comment · Fixed by #8865
Closed

Many revisions fixtures have nid = 1 and are causing intermittent test failures #8864

jywarren opened this issue Dec 16, 2020 · 1 comment · Fixed by #8865
Labels
high-priority testing issues are usually for adding unit tests, integration tests or any other tests for a feature

Comments

@jywarren
Copy link
Member

Follow-up to #8862 --

It looks like MANY of the revisions fixtures have nid = 1 -- that must be the underlying problem. I think we have to given them all unique nids, because notes are not supposed to have more than 1 revision! also... they dont have timestamps set so they are probably getting initialized with almost identical timestamps, which could account for the intermittent failures!

https://github.com/publiclab/plots2/blame/main/test/fixtures/revisions.yml#L91

this may take some untangling of the other tests that use these fixtures... we'll have to see! If we give unique nids we may have to add matching entries to /test/fixtures/nodes.yml to make this work.

Originally posted by @jywarren in #8862 (comment)

@noi5e
Copy link
Contributor

noi5e commented Jan 4, 2021

Currently working on this, will push changes to the branch in PR #8865

jywarren added a commit that referenced this issue Mar 23, 2021
* unique nids in revisions.yml

* change user 1 -> 2, add timestamp, status #8864

* add nodes matching new revision fixtures #8864

* update assertions for all notes to match new fixtures #8864

* switch to assert assigns(:notes).collect(&:status).uniq == [1]

* adjust node order in test

* Update notes_controller_test.rb

Co-authored-by: Will Gutierrez <[email protected]>
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this issue Oct 16, 2021
* unique nids in revisions.yml

* change user 1 -> 2, add timestamp, status publiclab#8864

* add nodes matching new revision fixtures publiclab#8864

* update assertions for all notes to match new fixtures publiclab#8864

* switch to assert assigns(:notes).collect(&:status).uniq == [1]

* adjust node order in test

* Update notes_controller_test.rb

Co-authored-by: Will Gutierrez <[email protected]>
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this issue Dec 28, 2021
* unique nids in revisions.yml

* change user 1 -> 2, add timestamp, status publiclab#8864

* add nodes matching new revision fixtures publiclab#8864

* update assertions for all notes to match new fixtures publiclab#8864

* switch to assert assigns(:notes).collect(&:status).uniq == [1]

* adjust node order in test

* Update notes_controller_test.rb

Co-authored-by: Will Gutierrez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority testing issues are usually for adding unit tests, integration tests or any other tests for a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants