Skip to content

Commit

Permalink
failures to init the keyspace are fatal to the whole run
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed Feb 4, 2016
1 parent 4c70891 commit c92cf74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ func createKeyspace(tb testing.TB, cluster *ClusterConfig, keyspace string) {
c.Timeout = 30 * time.Second
session, err := c.CreateSession()
if err != nil {
tb.Fatal("createSession:", err)
panic(err)
}
defer session.Close()
defer log.Println("closing keyspace session")

err = createTable(session, `DROP KEYSPACE IF EXISTS `+keyspace)
if err != nil {
tb.Fatal(err)
panic(fmt.Sprintf("unable to drop keyspace: %v", err))
}

err = createTable(session, fmt.Sprintf(`CREATE KEYSPACE %s
Expand All @@ -111,7 +111,7 @@ func createKeyspace(tb testing.TB, cluster *ClusterConfig, keyspace string) {
}`, keyspace, *flagRF))

if err != nil {
tb.Fatal(err)
panic(fmt.Sprintf("unable to create keyspace: %v", err))
}
}

Expand Down

0 comments on commit c92cf74

Please sign in to comment.