56
56
initOnce = sync.Once {}
57
57
debugdebugflag = flag .Bool ("vv" , false , "veryverbose" )
58
58
debugflag = flag .Bool ("v" , false , "verbose" )
59
+ longrunning = flag .Bool ("longrunning" , false , "do run long-running tests" )
59
60
w * whisper.Whisper
60
61
wapi * whisper.PublicWhisperAPI
61
62
psslogmain log.Logger
@@ -949,12 +950,19 @@ func worker(id int, jobs <-chan Job, rpcs map[discover.NodeID]*rpc.Client, pubke
949
950
}
950
951
}
951
952
953
+ func TestNetwork (t * testing.T ) {
954
+ t .Run ("16/1000/4/sim" , testNetwork )
955
+ }
956
+
952
957
// params in run name:
953
958
// nodes/msgs/addrbytes/adaptertype
954
959
// if adaptertype is exec uses execadapter, simadapter otherwise
955
960
func TestNetwork2000 (t * testing.T ) {
956
961
//enableMetrics()
957
962
963
+ if ! * longrunning {
964
+ t .Skip ("run with --longrunning flag to run extensive network tests" )
965
+ }
958
966
t .Run ("3/2000/4/sim" , testNetwork )
959
967
t .Run ("4/2000/4/sim" , testNetwork )
960
968
t .Run ("8/2000/4/sim" , testNetwork )
@@ -964,6 +972,9 @@ func TestNetwork2000(t *testing.T) {
964
972
func TestNetwork5000 (t * testing.T ) {
965
973
//enableMetrics()
966
974
975
+ if ! * longrunning {
976
+ t .Skip ("run with --longrunning flag to run extensive network tests" )
977
+ }
967
978
t .Run ("3/5000/4/sim" , testNetwork )
968
979
t .Run ("4/5000/4/sim" , testNetwork )
969
980
t .Run ("8/5000/4/sim" , testNetwork )
@@ -973,6 +984,9 @@ func TestNetwork5000(t *testing.T) {
973
984
func TestNetwork10000 (t * testing.T ) {
974
985
//enableMetrics()
975
986
987
+ if ! * longrunning {
988
+ t .Skip ("run with --longrunning flag to run extensive network tests" )
989
+ }
976
990
t .Run ("3/10000/4/sim" , testNetwork )
977
991
t .Run ("4/10000/4/sim" , testNetwork )
978
992
t .Run ("8/10000/4/sim" , testNetwork )
0 commit comments