Skip to content

Commit

Permalink
Add cassandra ReconnectInterval test.
Browse files Browse the repository at this point in the history
Signed-off-by: Brendan Shaklovitz <nyanshak@users.noreply.github.com>
  • Loading branch information
nyanshak committed Jul 13, 2018
1 parent d8e6faa commit e8494d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/storage/cassandra/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func TestOptions(t *testing.T) {
assert.Equal(t, primary.Keyspace, aux.Keyspace)
assert.Equal(t, primary.Servers, aux.Servers)
assert.Equal(t, primary.ConnectionsPerHost, aux.ConnectionsPerHost)
assert.Equal(t, primary.ReconnectInterval, aux.ReconnectInterval)
}

func TestOptionsWithFlags(t *testing.T) {
Expand All @@ -50,6 +51,7 @@ func TestOptionsWithFlags(t *testing.T) {
"--cas.keyspace=jaeger",
"--cas.servers=1.1.1.1,2.2.2.2",
"--cas.connections-per-host=42",
"--cas.reconnect-interval=42s",
"--cas.max-retry-attempts=42",
"--cas.timeout=42s",
"--cas.port=4242",
Expand All @@ -75,6 +77,7 @@ func TestOptionsWithFlags(t *testing.T) {
assert.Equal(t, 42, aux.ConnectionsPerHost)
assert.Equal(t, 42, aux.MaxRetryAttempts)
assert.Equal(t, 42*time.Second, aux.Timeout)
assert.Equal(t, 42*time.Second, aux.ReconnectInterval)
assert.Equal(t, 4242, aux.Port)
assert.Equal(t, "", aux.Consistency, "aux storage does not inherit consistency from primary")
assert.Equal(t, 3, aux.ProtoVersion)
Expand Down

0 comments on commit e8494d9

Please sign in to comment.