Skip to content

Commit

Permalink
chore: mark some tests as slow (#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas authored Jan 20, 2025
1 parent 7d9f6f5 commit 9ce5f1f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/buildengine/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import (
)

func TestGraph(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
ctx, cancel := context.WithCancel(log.ContextWithNewDefaultLogger(context.Background()))
t.Cleanup(cancel)
projConfig := projectconfig.Config{
Expand Down
12 changes: 12 additions & 0 deletions internal/raft/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (s *IntStateMachine) Save(writer io.Writer) error { return nil }
func (s *IntStateMachine) Close() error { return nil }

func TestClusterWith2Shards(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
ctx := testContext(t)

_, shards := startClusters(ctx, t, 2, func(b *raft.Builder) []sm.Handle[int64, int64, IntEvent] {
Expand All @@ -68,6 +71,9 @@ func TestClusterWith2Shards(t *testing.T) {
}

func TestJoiningExistingCluster(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
ctx := testContext(t)

addresses, err := local.FreeTCPAddresses(5)
Expand Down Expand Up @@ -124,6 +130,9 @@ func TestJoiningExistingCluster(t *testing.T) {
}

func TestLeavingCluster(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
ctx := testContext(t)

clusters, shards := startClusters(ctx, t, 3, func(b *raft.Builder) sm.Handle[int64, int64, IntEvent] {
Expand All @@ -143,6 +152,9 @@ func TestLeavingCluster(t *testing.T) {
}

func TestStateIter(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
ctx := testContext(t)

_, shards := startClusters(ctx, t, 2, func(b *raft.Builder) sm.Handle[int64, int64, IntEvent] {
Expand Down
3 changes: 3 additions & 0 deletions internal/raft/eventview_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func (v *IntSumView) UnmarshalBinary(data []byte) error {
}

func TestEventView(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
ctx := testContext(t)

_, views := startClusters(ctx, t, 2, func(b *raft.Builder) eventstream.EventView[IntSumView, IntStreamEvent] {
Expand Down

0 comments on commit 9ce5f1f

Please sign in to comment.