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

kvcache: fix unit test by avoiding lru OOM. (#10768) #11490

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Jul 29, 2019

cherry-pick #10768 to release-3.0

The test fails if my laptop memory is almost full.

----------------------------------------------------------------------
FAIL: simple_lru_test.go:177: testLRUCacheSuite.TestDelete

simple_lru_test.go:191:
    c.Assert(int(lru.size), Equals, 3)
... obtained int = 0
... expected int = 3

----------------------------------------------------------------------
FAIL: simple_lru_test.go:206: testLRUCacheSuite.TestDeleteAll

simple_lru_test.go:220:
    c.Assert(int(lru.size), Equals, 3)
... obtained int = 0
... expected int = 3

----------------------------------------------------------------------
FAIL: simple_lru_test.go:134: testLRUCacheSuite.TestGet

simple_lru_test.go:158:
    c.Assert(exists, IsTrue)
... obtained bool = false

----------------------------------------------------------------------
PASS: simple_lru_test.go:109: testLRUCacheSuite.TestOOMGuard	0.000s

----------------------------------------------------------------------
FAIL: simple_lru_test.go:55: testLRUCacheSuite.TestPut

simple_lru_test.go:70:
    c.Assert(lru.size, Equals, lru.capacity)
... obtained uint = 0x0
... expected uint = 0x3

OOPS: 1 passed, 4 FAILED
@sre-bot
Copy link
Contributor Author

sre-bot commented Jul 29, 2019

/run-all-tests

Copy link
Contributor

@XuHuaiyu XuHuaiyu 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
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason merged commit 9155e55 into pingcap:release-3.0 Jul 29, 2019
@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants