-
Notifications
You must be signed in to change notification settings - Fork 887
chore: Speed up port-forward tests #3062
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
Conversation
client = coderdtest.New(t, &coderdtest.Options{IncludeProvisionerD: true}) | ||
user = coderdtest.CreateFirstUser(t, client) | ||
_, workspace = runAgent(t, client, user.UserID) | ||
) |
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.
Note this change: We now share coderd/agent between tests. I didn't see any reason not-to.
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 will be an interesting test of how useful our logging messages are, since we're sharing a logger among multiple things happening at once (just like in a real deployment 😰 )
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.
That's an interesting point I did not think of. We'll also be sharing the parent *testing.T
😮. To be fair, with regards to test logging, I rarely find them helpful due to the verbosity / parallel execution. 😂
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.
Smart!
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.
Mean't to approve.
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.
Nice!
I've been looking at some CI test timeout test failures, and whilst I haven't gotten to the bottom of it, I thought we could significantly increase the speed of the
port-forward
tests. On my machine the test time went from ~30s to ~5s, should be a bigger gain in CI.