-
Notifications
You must be signed in to change notification settings - Fork 1k
Re-use unit tests #7469
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
Merged
Merged
Re-use unit tests #7469
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d86b9af
Extend unit tests
stephanos 1a460ad
remove taskQueueManagerOpt
stephanos d628bb6
remove teardown
stephanos 1983bf7
remove debug logging
stephanos 1977307
add cleanup TODOs
stephanos f625c79
remove teardown
stephanos d8ceded
try enabling TQM tests again
stephanos 771e00f
pass ackLevel into doGC
stephanos fb6380e
add expected error
stephanos 97c4877
use subqueueZero
stephanos 8580c9b
remove return
stephanos 653444c
correct refactored comment
stephanos a0acfa8
remove more teardown
stephanos 8cb4397
use constant
stephanos 58f11ed
rename dbConditionalFailedError to make clear it's random
stephanos fb6554a
extend BacklogManager tests
stephanos 509d05e
less strict about AddSpooledTask calls
stephanos 55cae91
add error expectation
stephanos 45dae01
prevent race in doGC
stephanos e0fc614
remove flaky test for now
stephanos 5213144
expect error
stephanos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,9 @@ type ( | |
TotalApproximateBacklogCount() int64 | ||
BacklogHeadAge() time.Duration | ||
InternalStatus() []*taskqueuespb.InternalTaskQueueStatus | ||
|
||
// TODO(pri): remove | ||
getDB() *taskQueueDB | ||
} | ||
|
||
backlogManagerImpl struct { | ||
|
@@ -232,8 +235,9 @@ func (c *backlogManagerImpl) InternalStatus() []*taskqueuespb.InternalTaskQueueS | |
StartId: c.taskWriter.taskIDBlock.start, | ||
EndId: c.taskWriter.taskIDBlock.end, | ||
}, | ||
LoadedTasks: c.taskAckManager.getBacklogCountHint(), | ||
MaxReadLevel: c.db.GetMaxReadLevel(subqueueZero), | ||
LoadedTasks: c.taskAckManager.getBacklogCountHint(), | ||
MaxReadLevel: c.db.GetMaxReadLevel(subqueueZero), | ||
ApproximateBacklogCount: c.db.getApproximateBacklogCount(subqueueZero), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this for parity with new backlog manager. |
||
}, | ||
} | ||
} | ||
|
@@ -306,3 +310,7 @@ func executeWithRetry( | |
func (c *backlogManagerImpl) queueKey() *PhysicalTaskQueueKey { | ||
return c.pqMgr.QueueKey() | ||
} | ||
|
||
func (c *backlogManagerImpl) getDB() *taskQueueDB { | ||
return c.db | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Convenience function for when no condition is needed.