Skip to content

Commit f52cdf4

Browse files
nolashkielbarry
authored andcommitted
swarm/pss: Hide big network tests under longrunning flag (ethereum#17074)
1 parent 6f52045 commit f52cdf4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

swarm/pss/pss_test.go

+14
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var (
5656
initOnce = sync.Once{}
5757
debugdebugflag = flag.Bool("vv", false, "veryverbose")
5858
debugflag = flag.Bool("v", false, "verbose")
59+
longrunning = flag.Bool("longrunning", false, "do run long-running tests")
5960
w *whisper.Whisper
6061
wapi *whisper.PublicWhisperAPI
6162
psslogmain log.Logger
@@ -949,12 +950,19 @@ func worker(id int, jobs <-chan Job, rpcs map[discover.NodeID]*rpc.Client, pubke
949950
}
950951
}
951952

953+
func TestNetwork(t *testing.T) {
954+
t.Run("16/1000/4/sim", testNetwork)
955+
}
956+
952957
// params in run name:
953958
// nodes/msgs/addrbytes/adaptertype
954959
// if adaptertype is exec uses execadapter, simadapter otherwise
955960
func TestNetwork2000(t *testing.T) {
956961
//enableMetrics()
957962

963+
if !*longrunning {
964+
t.Skip("run with --longrunning flag to run extensive network tests")
965+
}
958966
t.Run("3/2000/4/sim", testNetwork)
959967
t.Run("4/2000/4/sim", testNetwork)
960968
t.Run("8/2000/4/sim", testNetwork)
@@ -964,6 +972,9 @@ func TestNetwork2000(t *testing.T) {
964972
func TestNetwork5000(t *testing.T) {
965973
//enableMetrics()
966974

975+
if !*longrunning {
976+
t.Skip("run with --longrunning flag to run extensive network tests")
977+
}
967978
t.Run("3/5000/4/sim", testNetwork)
968979
t.Run("4/5000/4/sim", testNetwork)
969980
t.Run("8/5000/4/sim", testNetwork)
@@ -973,6 +984,9 @@ func TestNetwork5000(t *testing.T) {
973984
func TestNetwork10000(t *testing.T) {
974985
//enableMetrics()
975986

987+
if !*longrunning {
988+
t.Skip("run with --longrunning flag to run extensive network tests")
989+
}
976990
t.Run("3/10000/4/sim", testNetwork)
977991
t.Run("4/10000/4/sim", testNetwork)
978992
t.Run("8/10000/4/sim", testNetwork)

0 commit comments

Comments
 (0)