Skip to content

Commit

Permalink
Put the functions back in the correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-ho committed Sep 11, 2024
1 parent 163ca60 commit 6546db1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestMain(m *testing.M) {
os.Exit(code)
}

func syncClientsThenCheckEqual(t *testing.T, pairs []clientAndDocPair) bool {
func syncClientsThenAssertEqual(t *testing.T, pairs []clientAndDocPair) {
assert.True(t, len(pairs) > 1)
ctx := context.Background()
// Save own changes and get previous changes.
Expand All @@ -89,15 +89,11 @@ func syncClientsThenCheckEqual(t *testing.T, pairs []clientAndDocPair) bool {
for i, pair := range pairs[1:] {
v := pair.doc.Marshal()
fmt.Printf("after d%d: %s\n", i+2, v)
if expected != v {
return false
}
assert.Equal(t, expected, v)
}

return true
}

func syncClientsThenAssertEqual(t *testing.T, pairs []clientAndDocPair) {
func syncClientsThenCheckEqual(t *testing.T, pairs []clientAndDocPair) bool {
assert.True(t, len(pairs) > 1)
ctx := context.Background()
// Save own changes and get previous changes.
Expand All @@ -120,8 +116,12 @@ func syncClientsThenAssertEqual(t *testing.T, pairs []clientAndDocPair) {
for i, pair := range pairs[1:] {
v := pair.doc.Marshal()
fmt.Printf("after d%d: %s\n", i+2, v)
assert.Equal(t, expected, v)
if expected != v {
return false
}
}

return true
}

// activeClients creates and activates the given number of clients.
Expand Down

0 comments on commit 6546db1

Please sign in to comment.