util/optionaldeadline: disable scheduler latency-sensitive tests in CircleCI

This commit is contained in:
Christian Schwarz 2021-12-30 14:41:06 +01:00
parent 12503dc55a
commit a3d010c5f0

View File

@ -9,9 +9,11 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/zrepl/zrepl/util/chainlock" "github.com/zrepl/zrepl/util/chainlock"
"github.com/zrepl/zrepl/util/zreplcircleci"
) )
func TestContextWithOptionalDeadline(t *testing.T) { func TestContextWithOptionalDeadline(t *testing.T) {
zreplcircleci.SkipOnCircleCI(t, "test relies on predictably low scheduler latency")
ctx := context.Background() ctx := context.Background()
cctx, enforceDeadline := ContextWithOptionalDeadline(ctx) cctx, enforceDeadline := ContextWithOptionalDeadline(ctx)
@ -72,6 +74,7 @@ func TestContextWithOptionalDeadlineNegativeDeadline(t *testing.T) {
} }
func TestContextWithOptionalDeadlineParentCancellation(t *testing.T) { func TestContextWithOptionalDeadlineParentCancellation(t *testing.T) {
zreplcircleci.SkipOnCircleCI(t, "test relies on predictably low scheduler latency")
pctx, cancel := context.WithCancel(context.Background()) pctx, cancel := context.WithCancel(context.Background())
cctx, enforceDeadline := ContextWithOptionalDeadline(pctx) cctx, enforceDeadline := ContextWithOptionalDeadline(pctx)