@@ -33,6 +33,12 @@ func init() {
33
33
//logging.SetLevel(logging.DEBUG, "sbft")
34
34
}
35
35
36
+ func skipInShortMode (t * testing.T ) {
37
+ if testing .Short () {
38
+ t .Skip ("Skipping test in short mode." )
39
+ }
40
+ }
41
+
36
42
func connectAll (sys * testSystem ) {
37
43
// map iteration is non-deterministic, so use linear iteration instead
38
44
max := uint64 (0 )
@@ -62,6 +68,7 @@ func connectAll(sys *testSystem) {
62
68
}
63
69
64
70
func TestSBFT (t * testing.T ) {
71
+ skipInShortMode (t )
65
72
N := uint64 (4 )
66
73
sys := newTestSystem (N )
67
74
var repls []* SBFT
@@ -98,6 +105,7 @@ func TestSBFT(t *testing.T) {
98
105
}
99
106
100
107
func TestSBFTDelayed (t * testing.T ) {
108
+ skipInShortMode (t )
101
109
N := uint64 (4 )
102
110
sys := newTestSystem (N )
103
111
var repls []* SBFT
@@ -139,6 +147,7 @@ func TestSBFTDelayed(t *testing.T) {
139
147
}
140
148
141
149
func TestN1 (t * testing.T ) {
150
+ skipInShortMode (t )
142
151
N := uint64 (1 )
143
152
sys := newTestSystem (N )
144
153
var repls []* SBFT
@@ -167,6 +176,7 @@ func TestN1(t *testing.T) {
167
176
}
168
177
169
178
func TestMonotonicViews (t * testing.T ) {
179
+ skipInShortMode (t )
170
180
N := uint64 (4 )
171
181
sys := newTestSystem (N )
172
182
var repls []* SBFT
@@ -202,6 +212,7 @@ func TestMonotonicViews(t *testing.T) {
202
212
}
203
213
204
214
func TestByzPrimary (t * testing.T ) {
215
+ skipInShortMode (t )
205
216
N := uint64 (4 )
206
217
sys := newTestSystem (N )
207
218
var repls []* SBFT
@@ -256,6 +267,7 @@ func TestByzPrimary(t *testing.T) {
256
267
}
257
268
258
269
func TestViewChange (t * testing.T ) {
270
+ skipInShortMode (t )
259
271
N := uint64 (4 )
260
272
sys := newTestSystem (N )
261
273
var repls []* SBFT
@@ -295,6 +307,7 @@ func TestViewChange(t *testing.T) {
295
307
}
296
308
297
309
func TestMsgReordering (t * testing.T ) {
310
+ skipInShortMode (t )
298
311
N := uint64 (4 )
299
312
sys := newTestSystem (N )
300
313
var repls []* SBFT
@@ -347,6 +360,7 @@ func TestMsgReordering(t *testing.T) {
347
360
}
348
361
349
362
func TestBacklogReordering (t * testing.T ) {
363
+ skipInShortMode (t )
350
364
N := uint64 (4 )
351
365
sys := newTestSystem (N )
352
366
var repls []* SBFT
@@ -399,6 +413,7 @@ func TestBacklogReordering(t *testing.T) {
399
413
}
400
414
401
415
func TestViewChangeWithRetransmission (t * testing.T ) {
416
+ skipInShortMode (t )
402
417
N := uint64 (4 )
403
418
sys := newTestSystem (N )
404
419
var repls []* SBFT
@@ -438,6 +453,7 @@ func TestViewChangeWithRetransmission(t *testing.T) {
438
453
}
439
454
440
455
func TestViewChangeXset (t * testing.T ) {
456
+ skipInShortMode (t )
441
457
N := uint64 (4 )
442
458
sys := newTestSystem (N )
443
459
var repls []* SBFT
@@ -514,6 +530,7 @@ func TestViewChangeXset(t *testing.T) {
514
530
}
515
531
516
532
func TestRestart (t * testing.T ) {
533
+ skipInShortMode (t )
517
534
N := uint64 (4 )
518
535
sys := newTestSystem (N )
519
536
var repls []* SBFT
@@ -567,6 +584,7 @@ func TestRestart(t *testing.T) {
567
584
}
568
585
569
586
func TestAbdicatingPrimary (t * testing.T ) {
587
+ skipInShortMode (t )
570
588
N := uint64 (4 )
571
589
sys := newTestSystem (N )
572
590
var repls []* SBFT
@@ -625,6 +643,7 @@ func TestAbdicatingPrimary(t *testing.T) {
625
643
}
626
644
627
645
func TestRestartAfterPrepare (t * testing.T ) {
646
+ skipInShortMode (t )
628
647
N := uint64 (4 )
629
648
sys := newTestSystem (N )
630
649
var repls []* SBFT
@@ -694,6 +713,7 @@ func TestRestartAfterPrepare(t *testing.T) {
694
713
}
695
714
696
715
func TestRestartAfterCommit (t * testing.T ) {
716
+ skipInShortMode (t )
697
717
N := uint64 (4 )
698
718
sys := newTestSystem (N )
699
719
var repls []* SBFT
@@ -763,6 +783,7 @@ func TestRestartAfterCommit(t *testing.T) {
763
783
}
764
784
765
785
func TestRestartAfterCheckpoint (t * testing.T ) {
786
+ skipInShortMode (t )
766
787
N := uint64 (4 )
767
788
sys := newTestSystem (N )
768
789
var repls []* SBFT
@@ -832,6 +853,7 @@ func TestRestartAfterCheckpoint(t *testing.T) {
832
853
}
833
854
834
855
func TestErroneousViewChange (t * testing.T ) {
856
+ skipInShortMode (t )
835
857
N := uint64 (4 )
836
858
sys := newTestSystem (N )
837
859
var repls []* SBFT
@@ -921,6 +943,7 @@ func TestErroneousViewChange(t *testing.T) {
921
943
}
922
944
923
945
func TestRestartMissedViewChange (t * testing.T ) {
946
+ skipInShortMode (t )
924
947
N := uint64 (4 )
925
948
sys := newTestSystem (N )
926
949
var repls []* SBFT
@@ -993,6 +1016,7 @@ func TestRestartMissedViewChange(t *testing.T) {
993
1016
}
994
1017
995
1018
func TestFullBacklog (t * testing.T ) {
1019
+ skipInShortMode (t )
996
1020
N := uint64 (4 )
997
1021
sys := newTestSystem (N )
998
1022
var repls []* SBFT
@@ -1034,6 +1058,7 @@ func TestFullBacklog(t *testing.T) {
1034
1058
}
1035
1059
1036
1060
func TestHelloMsg (t * testing.T ) {
1061
+ skipInShortMode (t )
1037
1062
N := uint64 (4 )
1038
1063
sys := newTestSystemWOTimers (N )
1039
1064
var repls []* SBFT
@@ -1100,6 +1125,7 @@ func TestHelloMsg(t *testing.T) {
1100
1125
}
1101
1126
1102
1127
func TestViewChangeTimer (t * testing.T ) {
1128
+ skipInShortMode (t )
1103
1129
N := uint64 (4 )
1104
1130
sys := newTestSystem (N )
1105
1131
var repls []* SBFT
@@ -1183,6 +1209,7 @@ func TestViewChangeTimer(t *testing.T) {
1183
1209
}
1184
1210
1185
1211
func TestResendViewChange (t * testing.T ) {
1212
+ skipInShortMode (t )
1186
1213
N := uint64 (4 )
1187
1214
sys := newTestSystem (N )
1188
1215
var repls []* SBFT
@@ -1242,6 +1269,7 @@ func TestResendViewChange(t *testing.T) {
1242
1269
}
1243
1270
1244
1271
func TestTenReplicasBombedWithRequests (t * testing.T ) {
1272
+ skipInShortMode (t )
1245
1273
N := uint64 (10 )
1246
1274
requestNumber := 11
1247
1275
sys := newTestSystem (N )
0 commit comments