Explorar o código

err count missmatched is now improved

Chris Bannister %!s(int64=10) %!d(string=hai) anos
pai
achega
f11cb55c32
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      cassandra_test.go

+ 2 - 2
cassandra_test.go

@@ -336,8 +336,8 @@ func TestCAS(t *testing.T) {
 	}
 
 	if _, err := session.Query(`DELETE FROM cas_table WHERE title = ? and revid = ? IF last_modified = ?`,
-		title, revid, tenSecondsLater).ScanCAS(); err.Error() != "count mismatch" {
-		t.Fatalf("delete: was expecting count mismatch error but got %s", err)
+		title, revid, tenSecondsLater).ScanCAS(); !strings.HasPrefix(err.Error(), "gocql: not enough columns to scan into") {
+		t.Fatal("delete: was expecting count mismatch error but got: %q", err.Error())
 	}
 
 	if applied, err := session.Query(`DELETE FROM cas_table WHERE title = ? and revid = ? IF last_modified = ?`,