mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: test that periodic GC works
We've broken periodic GC a few times without noticing because there's no test for it, partly because you have to wait two minutes to see if it happens. This exposes control of the periodic GC timeout to runtime tests and adds a test that cranks it down to zero and sleeps for a bit to make sure periodic GCs happen. Change-Id: I3ec44e967e99f4eda752f85c329eebd18b87709e Reviewed-on: https://go-review.googlesource.com/13169 Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com>
This commit is contained in:
parent
829cc349c5
commit
e01be84149
3 changed files with 46 additions and 9 deletions
|
|
@ -155,3 +155,5 @@ const PtrSize = ptrSize
|
|||
|
||||
var TestingAssertE2I2GC = &testingAssertE2I2GC
|
||||
var TestingAssertE2T2GC = &testingAssertE2T2GC
|
||||
|
||||
var ForceGCPeriod = &forcegcperiod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue