-
Notifications
You must be signed in to change notification settings - Fork 28
Remove things tests #126
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
Remove things tests #126
Conversation
82a4f6a to
efe0345
Compare
078c923 to
6ff043e
Compare
anderslindho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reconsider the commit structure or expand the commit messages a bit
6ff043e to
638a14a
Compare
| record(longout, "$(P)lo:base_pv2") { | ||
| info("test", "testing") | ||
| info("hello", "world") | ||
| info("archive", "default") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a somewhat confusing change on its own because it really doesn't look like you're removing an infotag, but the point I guess is that since you have added the PV to the base .db file you need it here as well.
It might be nice if there were a better way to manage this, but shrug. Maybe something with dbLoadTemplate, or one file per record?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree - I think one record per file might help here
Could also template startup scripts, which then further could "automate" getting record counts (as each dbLoadTemplate would be +=1)
But maybe too much indirection - not sure
anderslindho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the names - of startup scripts, db files, records - all are a bit confusing. What is "base"? Why do you sometimes use the term "pv" and sometimes "record"? What even is a base record - are you claming that the collection of "test", "hello", "archive" info-tags with those values are the base of the setup? (Then why is ai:base_pv different?)
I also think a refactoring along what @simon-ess suggested would make sense, to have one record per db file. I would take it further and template startup scripts in the test file where they are relevant, and I might even define the db-files in the same manner (using tmp path/dir fixtures).
| # Act | ||
| restart_ioc(docker_ioc, cf_client, base_channel_name, "st_remove_infotag") | ||
|
|
||
| # Assert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit is a nice change, but I'd say it's a matter of factoring out start and restart functions 🔧
| def test_number_of_aliases_and_alais_property(self, cf_client: ChannelFinderClient) -> None: | ||
| channels = cf_client.find(property=[("alias", "*")]) | ||
| assert len(channels) == 8 | ||
| assert len(channels) == IOC_COUNT * BASE_ALIAS_COUNT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can squash this commit with previous
| record(longout, "$(P)lo:base_pv2") { | ||
| info("test", "testing") | ||
| info("hello", "world") | ||
| info("archive", "default") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree - I think one record per file might help here
Could also template startup scripts, which then further could "automate" getting record counts (as each dbLoadTemplate would be +=1)
But maybe too much indirection - not sure
5c66ef3 to
3f8cd76
Compare
35af100 to
393ef9b
Compare
|
We still have the issue with flaky test failures. I assume the 3.9 and 3.12 tests will pass if we re-run them a couple of times. Doesn't have to be part of this PR but I wonder if we could change the port allocation to be a random port in And then if the Or maybe the containers just need to be torn down at the end of each test? |
They should be torn down between each test class already. I think this problem is them not tearing down fast enough. I will try random port in another PR. The previous flakyness I used to see was the docker machine not being ready at the time the tests started, which I'm less sure on how to fix as its from the github actions os. |
|
Think I will try this now.... |



Tests for
Removing a channel
Removing an alias