Remove use of require assertions inside Eventually calls#31112
Merged
Conversation
rosstimothy
reviewed
Aug 28, 2023
rosstimothy
approved these changes
Aug 28, 2023
403915b to
4c623d5
Compare
hugoShaka
approved these changes
Aug 29, 2023
strideynet
reviewed
Aug 29, 2023
require.Eventually runs the predicate function in a background goroutine. It is invalid to use require to make assertions inside the eventually, because require will fail the test if the assertion fails, and tests can only be failed from the test's main goroutine.
4c623d5 to
3eabe9b
Compare
Collaborator
Author
|
@strideynet thanks for the pointer - I've come to the conclusion that we should almost always prefer |
strideynet
approved these changes
Aug 30, 2023
rosstimothy
approved these changes
Aug 30, 2023
3eabe9b to
a894035
Compare
a894035 to
b5e35a8
Compare
jakule
pushed a commit
that referenced
this pull request
Oct 18, 2023
This commit contains: - a refactoring of the model action logic to be exposed through the `DoAction` function - Expose `RunTool()` capability through ai.Client and assist.Assist - Add the "audit-query" action that invokes directly the audit generation tool
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 19, 2023
* Add the ability to run a specific tool to Assist. (#31112) This commit contains: - a refactoring of the model action logic to be exposed through the `DoAction` function - Expose `RunTool()` capability through ai.Client and assist.Assist - Add the "audit-query" action that invokes directly the audit generation tool * stream audit query responses (#31092) * stream audit query responses * fixup! stream audit query responses * fixup! fixup! stream audit query responses --------- Co-authored-by: Hugo Shaka <hugo.hervieux@goteleport.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
require.Eventually runs the predicate function in a background goroutine. It is invalid to use require to make assertions inside the eventually, because require will fail the test if the assertion fails, and tests can only be failed from the test's main goroutine.