Skip to content

Commit

Permalink
Merge remote-tracking branch 'gocql/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed Aug 17, 2016
2 parents 54f06dd + ba69bae commit 6ec2700
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ env:
AUTH=false

go:
- 1.5.3
- 1.6
- 1.7

install:
- pip install --user cql PyYAML six
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ Caleb Doxsey <caleb@datadoghq.com>
Frederic Hemery <frederic.hemery@datadoghq.com>
Pekka Enberg <penberg@scylladb.com>
Mark M <m.mim95@gmail.com>
Bartosz Burclaf <burclaf@gmail.com>
Marcus King <marcusking01@gmail.com>
10 changes: 8 additions & 2 deletions cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,15 @@ func TestNotEnoughQueryArgs(t *testing.T) {
// TestCreateSessionTimeout tests to make sure the CreateSession function timeouts out correctly
// and prevents an infinite loop of connection retries.
func TestCreateSessionTimeout(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

go func() {
<-time.After(2 * time.Second)
t.Error("no startup timeout")
select {
case <-time.After(2 * time.Second):
t.Error("no startup timeout")
case <-ctx.Done():
}
}()

cluster := createCluster()
Expand Down
14 changes: 7 additions & 7 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// PoolConfig configures the connection pool used by the driver, it defaults to
// using a round robbin host selection policy and a round robbin connection selection
// using a round-robin host selection policy and a round-robin connection selection
// policy for each host.
type PoolConfig struct {
// HostSelectionPolicy sets the policy for selecting which host to use for a
Expand All @@ -23,9 +23,9 @@ func (p PoolConfig) buildPool(session *Session) *policyConnPool {
}

type DiscoveryConfig struct {
// If not empty will filter all discoverred hosts to a single Data Centre (default: "")
// If not empty will filter all discovered hosts to a single Data Centre (default: "")
DcFilter string
// If not empty will filter all discoverred hosts to a single Rack (default: "")
// If not empty will filter all discovered hosts to a single Rack (default: "")
RackFilter string
// ignored
Sleep time.Duration
Expand All @@ -44,8 +44,8 @@ func (d DiscoveryConfig) matchFilter(host *HostInfo) bool {
}

// ClusterConfig is a struct to configure the default cluster implementation
// of gocoql. It has a varity of attributes that can be used to modify the
// behavior to fit the most common use cases. Applications that requre a
// of gocoql. It has a variety of attributes that can be used to modify the
// behavior to fit the most common use cases. Applications that require a
// different setup must implement their own cluster.
type ClusterConfig struct {
Hosts []string // addresses for the initial connections
Expand Down Expand Up @@ -79,7 +79,7 @@ type ClusterConfig struct {
// receiving a schema change frame. (deault: 60s)
MaxWaitSchemaAgreement time.Duration

// HostFilter will filter all incoming events for host, any which dont pass
// HostFilter will filter all incoming events for host, any which don't pass
// the filter will be ignored. If set will take precedence over any options set
// via Discovery
HostFilter HostFilter
Expand Down Expand Up @@ -113,7 +113,7 @@ type ClusterConfig struct {
// DisableSkipMetadata will override the internal result metadata cache so that the driver does not
// send skip_metadata for queries, this means that the result will always contain
// the metadata to parse the rows and will not reuse the metadata from the prepared
// staement.
// statement.
//
// See https://issues.apache.org/jira/browse/CASSANDRA-10786
DisableSkipMetadata bool
Expand Down
Loading

0 comments on commit 6ec2700

Please sign in to comment.