Skip to content

Commit 0696bac

Browse files
committed
Speed up bully test
1 parent 11da4b3 commit 0696bac

File tree

1 file changed

+1
-116
lines changed

1 file changed

+1
-116
lines changed

comm/elector/bully_test.go

Lines changed: 1 addition & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (s *BullyTestSuite) SetupIndividualTest(c BullyTestCase) ([]elector.Coordin
110110
PingBackOff: 1 * time.Second,
111111
PingInterval: 1 * time.Second,
112112
ElectionWaitTime: 2 * time.Second,
113-
BullyWaitTime: 25 * time.Second,
113+
BullyWaitTime: 10 * time.Second,
114114
}, com)
115115
testBullyCoordinators = append(testBullyCoordinators, b)
116116
}
@@ -122,121 +122,6 @@ func (s *BullyTestSuite) TearDownTest() {}
122122

123123
func (s *BullyTestSuite) TestBully_GetCoordinator_OneDelay() {
124124
testCases := []BullyTestCase{
125-
{
126-
name: "three relayers bully coordination - all relayers starting at the same time",
127-
isLeaderActive: true,
128-
testRelayers: []RelayerTestDescriber{
129-
{
130-
name: "R1",
131-
index: 0,
132-
initialDelay: 0,
133-
},
134-
{
135-
name: "R2",
136-
index: 1,
137-
initialDelay: 0,
138-
},
139-
{
140-
name: "R3",
141-
index: 2,
142-
initialDelay: 0,
143-
},
144-
},
145-
},
146-
{
147-
name: "three relayers bully coordination - one relayer lags",
148-
isLeaderActive: true,
149-
testRelayers: []RelayerTestDescriber{
150-
{
151-
name: "R1",
152-
index: 0,
153-
initialDelay: 0,
154-
},
155-
{
156-
name: "R2",
157-
index: 1,
158-
initialDelay: 0,
159-
},
160-
{
161-
name: "R3",
162-
index: 2,
163-
initialDelay: 2 * time.Second,
164-
},
165-
},
166-
},
167-
{
168-
name: "three relayers bully coordination - two relayer lags for same amount",
169-
isLeaderActive: true,
170-
testRelayers: []RelayerTestDescriber{
171-
{
172-
name: "R1",
173-
index: 0,
174-
initialDelay: 0,
175-
},
176-
{
177-
name: "R2",
178-
index: 1,
179-
initialDelay: 2 * time.Second,
180-
},
181-
{
182-
name: "R3",
183-
index: 2,
184-
initialDelay: 2 * time.Second,
185-
},
186-
},
187-
},
188-
{
189-
name: "three relayers bully coordination - two relayer lag for different amount",
190-
isLeaderActive: true,
191-
testRelayers: []RelayerTestDescriber{
192-
{
193-
name: "R1",
194-
index: 0,
195-
initialDelay: 0,
196-
},
197-
{
198-
name: "R2",
199-
index: 1,
200-
initialDelay: 2 * time.Second,
201-
},
202-
{
203-
name: "R3",
204-
index: 2,
205-
initialDelay: 3 * time.Second,
206-
},
207-
},
208-
},
209-
{
210-
name: "five relayers bully coordination - all relayers starting at the same time",
211-
isLeaderActive: true,
212-
testRelayers: []RelayerTestDescriber{
213-
{
214-
name: "R1",
215-
index: 0,
216-
initialDelay: 0,
217-
},
218-
{
219-
name: "R2",
220-
index: 1,
221-
initialDelay: 0,
222-
},
223-
{
224-
name: "R3",
225-
index: 2,
226-
initialDelay: 0,
227-
},
228-
{
229-
name: "R4",
230-
index: 3,
231-
initialDelay: 0,
232-
},
233-
{
234-
name: "R5",
235-
index: 4,
236-
initialDelay: 0,
237-
},
238-
},
239-
},
240125
{
241126
name: "five relayers bully coordination - multiple lags on relayers",
242127
isLeaderActive: true,

0 commit comments

Comments
 (0)