diff --git a/graph/db/graph_test.go b/graph/db/graph_test.go index 25ce1edf7..3c60826e1 100644 --- a/graph/db/graph_test.go +++ b/graph/db/graph_test.go @@ -2510,6 +2510,11 @@ func TestFilterKnownChanIDs(t *testing.T) { // methods that acquire the cache mutex along with the DB mutex. func TestStressTestChannelGraphAPI(t *testing.T) { t.Parallel() + + if testing.Short() { + t.Skipf("Skipping test in short mode") + } + ctx := context.Background() graph := MakeTestGraph(t) diff --git a/graph/db/sql_migration_test.go b/graph/db/sql_migration_test.go index eaaaee6c5..7d6b0e3b0 100644 --- a/graph/db/sql_migration_test.go +++ b/graph/db/sql_migration_test.go @@ -1177,6 +1177,10 @@ func assertResultState(t *testing.T, sql *SQLStore, expState dbState) { func TestMigrateGraphToSQLRapid(t *testing.T) { t.Parallel() + if testing.Short() { + t.Skipf("skipping test in short mode") + } + dbFixture := NewTestDBFixture(t) rapid.Check(t, func(rt *rapid.T) { diff --git a/make/testing_flags.mk b/make/testing_flags.mk index 7e4ba5b0e..95a493930 100644 --- a/make/testing_flags.mk +++ b/make/testing_flags.mk @@ -121,6 +121,12 @@ ifneq ($(nocache),) TEST_FLAGS += -test.count=1 endif +# If the short flag is added, then any unit tests marked with "testing.Short()" +# will be skipped. +ifneq ($(short),) +TEST_FLAGS += -short +endif + GOLIST := $(GOCC) list -tags="$(DEV_TAGS)" -deps $(PKG)/... | grep '$(PKG)'| grep -v '/vendor/' # UNIT_TARGTED is undefined iff a specific package and/or unit test case is