Skip to content
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

Merged
merged 1 commit into from
Nov 9, 2017

Conversation

fcrisciani
Copy link

  • 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

@codecov-io
Copy link

codecov-io commented Sep 26, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@0caae82). Click here to learn what that means.
The diff coverage is 76.47%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1957   +/-   ##
=========================================
  Coverage          ?   38.81%           
=========================================
  Files             ?      137           
  Lines             ?    27358           
  Branches          ?        0           
=========================================
  Hits              ?    10620           
  Misses            ?    15441           
  Partials          ?     1297
Impacted Files Coverage Δ
networkdb/cluster.go 61.07% <ø> (ø)
networkdb/delegate.go 76.27% <57.14%> (ø)
networkdb/networkdb.go 63.66% <90%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0caae82...c832d78. Read the comment docs.

- 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>
func TestNetworkDBGarbageCollection(t *testing.T) {
keysWriteDelete := 5
config := DefaultConfig()
config.reapEntryInterval = 30 * time.Second
Copy link

@AntaresS AntaresS Nov 1, 2017

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?

Copy link
Author

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks

Copy link

@AntaresS AntaresS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@vieux vieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fcrisciani fcrisciani merged commit 460ac8f into moby:master Nov 9, 2017
@fcrisciani fcrisciani deleted the netdb-gc-test branch November 20, 2017 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants