Skip to content

Commit

Permalink
idiom
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Sep 18, 2021
1 parent 32db03b commit b6fe1a4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/readonlytest/readonly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,14 @@ func TestRestrictionWithConnectionPool(t *testing.T) {
for {
t := <-ticker.C
_, err := conn.ExecContext(context.Background(), fmt.Sprintf("insert into t values (%d)", t.Nanosecond()))
if err == nil {
continue
}
if err.Error() == ReadOnlyErrMsg {
done <- true
} else {
done <- false
if err != nil {
if err.Error() == ReadOnlyErrMsg {
done <- true
} else {
done <- false
}
return
}
return
}
}(conn, done)
time.Sleep(1 * time.Second)
Expand Down

0 comments on commit b6fe1a4

Please sign in to comment.