Skip to content

Commit

Permalink
Use createTable to create tables, this test is slightly racy with > 1…
Browse files Browse the repository at this point in the history
… node
  • Loading branch information
Zariel committed Aug 11, 2014
1 parent 93e6f50 commit 0a1aa59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ func TestErrorsParse(t *testing.T) {
session := createSession(t)
defer session.Close()

if err := session.Query(`CREATE TABLE errors_parse (id int primary key)`).Exec(); err != nil {
if err := createTable(session, `CREATE TABLE errors_parse (id int primary key)`); err != nil {
t.Fatal("create:", err)
}

if err := session.Query(`CREATE TABLE errors_parse (id int primary key)`).Exec(); err == nil {
if err := createTable(session, `CREATE TABLE errors_parse (id int primary key)`); err == nil {
t.Fatal("Should have gotten already exists error from cassandra server.")
} else {
switch e := err.(type) {
Expand Down

0 comments on commit 0a1aa59

Please sign in to comment.