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

Improve test case for Issue1888 #1906

Closed
wants to merge 1 commit into from

Conversation

Deepskyhunter
Copy link
Contributor

@Deepskyhunter Deepskyhunter commented Jun 13, 2022

Shortened the due_date different between experiments
Record and compare the order by the time it finished all stage and deleted item of rid 1 and 2

ARTIQ Pull Request

Description of Changes

Changed the test case.

  1. Reduced time different between early and late
  2. Record the RID when the item is finished and deleted
  3. Compare the resulted RID order with the expected one.

Related Issue #1888

Type of Changes

Type
🐛 Bug fix

Steps (Choose relevant, delete irrelevant before submitting)

All Pull Requests

  • Use correct spelling and grammar.
  • Close/update issues.

Code Changes

  • Run flake8 to check code style (follow PEP-8 style). flake8 has issues with parsing Migen/gateware code, ignore as necessary.
  • Test your changes or have someone test them. Mention what was tested and how.
  • Add and check docstrings and comments
  • Check, test, and update the unittests in /artiq/test/ or gateware simulations in /artiq/gateware/test

Git Logistics

  • Split your contribution into logically separate changes (git rebase --interactive). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.
  • Write short & meaningful commit messages. Review each commit for messages (git show). Format:
    topic: description. < 50 characters total.
    
    Longer description. < 70 characters per line
    

Licensing

See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

Shortened the due_date different between experiments
Record and compare the order by the time it finished all stage and deleted item of rid 1 and 2
@Deepskyhunter Deepskyhunter changed the title Improved test case for Issu1888 Improve test case for Issue1888 Jun 13, 2022
@sbourdeauducq
Copy link
Member

Reduced time different between early and late

Why?

@Deepskyhunter
Copy link
Contributor Author

The previous time() + 100000 was meant not to be finished and therefore the expect case didn't have RID 1 and call a stop after deleting RID 2.
The current changes include RID 1 into the expect case [2,1] to make it clear RID 2 is run before RID 1.
Reduced time different can reduce the time for testing while the priority still hold valid.

Alternative is call a stop when RID 2 is deleted and revert the time different.

@sbourdeauducq
Copy link
Member

This check is a bit loose. The comment called for a check that the Experiment goes through all stages, not just that it gets deleted.

And if we start having code that interprets the scheduler events in this way, this raises the question of whether we should refactor the other tests to also use it.

@sbourdeauducq
Copy link
Member

The previous time() + 100000 was meant not to be finished and therefore the expect case didn't have RID 1 and call a stop after deleting RID 2.
The current changes include RID 1 into the expect case [2,1] to make it clear RID 2 is run before RID 1.

Then it seems you are not testing the same thing anymore?

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.

2 participants