Skip to content

Commit 6558b07

Browse files
committed
Polish e2e test
1 parent 5052cfe commit 6558b07

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

server/test/e2e/covenantless/e2e_test.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ func TestSettleInSameRound(t *testing.T) {
130130
wwg := &sync.WaitGroup{}
131131
wwg.Add(1)
132132
go func() {
133-
v, err := bob.NotifyIncomingFunds(ctx, bobAddr)
134-
fmt.Println("BBBBB", len(v), err)
135-
wwg.Done()
133+
defer wwg.Done()
134+
vtxos, err := bob.NotifyIncomingFunds(ctx, bobAddr)
135+
require.NoError(t, err)
136+
require.NotEmpty(t, vtxos)
136137
}()
137138
bobRoundID, bobErr = bob.Settle(ctx)
138139
wwg.Wait()
139140
}()
140141

141142
wg.Wait()
142-
fmt.Println("1")
143143

144144
require.NoError(t, aliceErr)
145145
require.NoError(t, bobErr)
@@ -152,37 +152,29 @@ func TestSettleInSameRound(t *testing.T) {
152152
aliceVtxos, _, err := alice.ListVtxos(ctx)
153153
require.NoError(t, err)
154154
require.NotEmpty(t, aliceVtxos)
155-
fmt.Println("OK")
156155

157156
bobVtxos, _, err := bob.ListVtxos(ctx)
158157
require.NoError(t, err)
159158
require.NotEmpty(t, bobVtxos)
160-
fmt.Println("OKOK")
161159

162160
aliceOffchainAddr, _, err := alice.Receive(ctx)
163161
require.NoError(t, err)
164-
fmt.Println("OKOKOK")
165162

166163
bobOffchainAddr, _, err := bob.Receive(ctx)
167164
require.NoError(t, err)
168-
fmt.Println("OKOKOKOK")
169165

170166
// Alice sends to Bob
171167
wg.Add(1)
172-
fmt.Println("OKOKOKOKOK")
173168
go func() {
174169
defer wg.Done()
175170
vtxos, err := alice.NotifyIncomingFunds(ctx, bobOffchainAddr)
176-
fmt.Println("HAKBHJV", len(vtxos), err)
177171
require.NoError(t, err)
178172
require.NotEmpty(t, vtxos)
179173
}()
180174
_, err = alice.SendOffChain(ctx, false, []arksdk.Receiver{arksdk.NewBitcoinReceiver(bobOffchainAddr, 5000)}, false)
181175
require.NoError(t, err)
182-
fmt.Println("OKOKOKOKOKOK")
183176

184177
wg.Wait()
185-
fmt.Println("2")
186178

187179
// Bob sends to Alice
188180
wg.Add(1)
@@ -196,7 +188,6 @@ func TestSettleInSameRound(t *testing.T) {
196188
require.NoError(t, err)
197189

198190
wg.Wait()
199-
fmt.Println("3")
200191

201192
wg.Add(2)
202193

@@ -231,7 +222,6 @@ func TestSettleInSameRound(t *testing.T) {
231222
}()
232223

233224
wg.Wait()
234-
fmt.Println("4")
235225

236226
require.NoError(t, aliceErr)
237227
require.NoError(t, bobErr)

0 commit comments

Comments
 (0)