Closed
Description
What version of Cassandra are you using?
Any.
What version of Gocql are you using?
What did you do?
package gocql
import "testing"
func TestErrorNotPropagated(t *testing.T) {
cluster := createCluster()
t.Logf("Using %T", cluster.RetryPolicy)
session, err := cluster.CreateSession()
if err != nil {
t.Fatal(err)
}
defer session.Close()
q := session.Query("BLA BLA BLA")
if err := q.Exec(); err != nil {
t.Log(err)
}
// e48272f
// grr_test.go:7: Using *gocql.SimpleRetryPolicy
// grr_test.go:17: gocql: no hosts available in the pool
// 153a728
// grr_test.go:7: Using *gocql.SimpleRetryPolicy
// grr_test.go:17: line 1:0 no viable alternative at input 'BLA' ([BLA]...)
}
What did you expect to see?
Proper error form server:
line 1:0 no viable alternative at input 'BLA' ([BLA]...)
What did you see instead?
Wrong information that the pool is empty
gocql: no hosts available in the pool
With the changes introduced in e48272f, if using RetryPolicy user is not notified about server (or any other) errors.