stable tests

This commit is contained in:
Evgeny Danienko 2022-05-13 09:11:17 +03:00
parent b05c336a83
commit 39d943d22e
3 changed files with 7 additions and 1 deletions

View file

@ -14,7 +14,7 @@ GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
GIT_TAG ?= $(shell git describe --tags `git rev-list --tags="v*" --max-count=1`)
PACKAGE = github.com/ethereum/go-ethereum
GO_FLAGS += -trimpath -buildvcs=false
GO_FLAGS += -buildvcs=false
GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}"
TESTALL = $$(go list ./... | grep -v go-ethereum/cmd/)

View file

@ -7,7 +7,9 @@ func IgnoreList() []goleak.Option {
// a list of goroutne leaks that hard to fix due to external dependencies or too big refactoring needed
goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache"),
goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"),
goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).internal"),
goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch"),
goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*nonrecursiveTree).internal"),
goleak.IgnoreTopFunction("github.com/rjeczalik/notify._Cfunc_CFRunLoopRun"),
// todo: this leaks should be fixed

View file

@ -244,6 +244,7 @@ func TestUniformSampleIncludesTail(t *testing.T) {
}
func TestUniformSampleSnapshot(t *testing.T) {
rand.Seed(1)
s := NewUniformSample(100)
for i := 1; i <= 10000; i++ {
s.Update(int64(i))
@ -339,6 +340,9 @@ func TestUniformSampleConcurrentUpdateCount(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
rand.Seed(1)
s := NewUniformSample(100)
for i := 0; i < 100; i++ {
s.Update(int64(i))