databasecassandraintegration-testingdatastaxgocql

Artificially create Cassandra error to test retry policy


How might you force a Cassandra error that triggers a retry policy?

According to the DataStax, the following errors trigger a retry policy:

Edit: The driver I'm using is called gocql


Solution

  • Toggle the network connection of a node off, and it will appear momentarily down. Any request that needed that node to satisfy the consistency level, or if that node was the co-ordinator of the query will need to retry.