add functional tests for history_node cleanup#9931
Open
feiyang3cat wants to merge 2 commits intotemporalio:mainfrom
Open
add functional tests for history_node cleanup#9931feiyang3cat wants to merge 2 commits intotemporalio:mainfrom
feiyang3cat wants to merge 2 commits intotemporalio:mainfrom
Conversation
e3b084e to
c323827
Compare
| // TestDeletionOfSingleWorkflow runs a single workflow, force-deletes it via the | ||
| // admin API, then asserts that all history_tree and history_node rows are removed. | ||
| func TestDeletionOfSingleWorkflow(t *testing.T) { | ||
| t.Parallel() |
Contributor
There was a problem hiding this comment.
check out #9536. We may want to use parallel suite to begin with, there's a list of functional tests in the diff that you can reference for newer guidelines
cc @stephanos
Contributor
There was a problem hiding this comment.
💯 recommended to use parallelsuite here.
| PageSize: 1000, | ||
| }) | ||
| if err == nil { | ||
| env.Empty(resp.HistoryEvents, "history_node rows should be gone after deletion") |
Contributor
There was a problem hiding this comment.
nit: imo error messages are more clear when they note what went wrong first, rather than the desired state.
Contributor
Author
There was a problem hiding this comment.
I think here shall be a state-based invariant as there can be too many ways things may go wrong and they don't exist now
c323827 to
5a165b0
Compare
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.
What changed?
Add a functional test for history_node cleanup logic.
Why?
Verify so history_nodes are left in normal deletion process.