-
Notifications
You must be signed in to change notification settings - Fork 880
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
Add test to confirm garbage collection #1957
Conversation
b9d96ce
to
6d8443c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1957 +/- ##
=========================================
Coverage ? 38.81%
=========================================
Files ? 137
Lines ? 27358
Branches ? 0
=========================================
Hits ? 10620
Misses ? 15441
Partials ? 1297
Continue to review full report at Codecov.
|
6d8443c
to
8751a73
Compare
8751a73
to
540b97f
Compare
- Create a test to verify that a node that joins in an async way is not going to extend the life of a already deleted object Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
540b97f
to
c832d78
Compare
func TestNetworkDBGarbageCollection(t *testing.T) { | ||
keysWriteDelete := 5 | ||
config := DefaultConfig() | ||
config.reapEntryInterval = 30 * time.Second |
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.
Just want to make sure, I saw in the networkdb.go
it has reapEntryInterval = 30 * time.Minute
. Are we reducing it to 30 seconds in order to save time in the test?
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.
yep, this is only for test purposes and not to delay the unit test CI
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.
Got it. Thanks
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.
LGTM
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.
LGTM
in an async way is not going to extend the life
of a already deleted object
Signed-off-by: Flavio Crisciani flavio.crisciani@docker.com