Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d7cb69c

Browse files
committedSep 21, 2020
Fix to MV support for integration test. Tweak cassandra.yaml if we've got the appropriate
C* version and we aren't using DSE.
1 parent c595ab8 commit d7cb69c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎support/ccm.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ def cassandra_version_from_dse(dse_version)
854854
@cluster_version = @dse_version || @cassandra_version
855855
@cluster_name = "ruby-driver-#{@dse ? 'dse' : 'cassandra'}-#{@cluster_version.gsub('.', '_')}-test-cluster"
856856

857-
attr_accessor :dse_version, :cassandra_version
857+
attr_accessor :dse_version, :cassandra_version, :dse
858858

859859
def maybe_recreate_current_cluster(no_dc, no_nodes_per_dc)
860860
unless @current_cluster.nodes_count == (no_dc * no_nodes_per_dc) && @current_cluster.datacenters_count == no_dc
@@ -936,6 +936,7 @@ def switch_cluster(name)
936936
end
937937

938938
def create_cluster(name, version, datacenters, nodes_per_datacenter)
939+
939940
nodes = Array.new(datacenters, nodes_per_datacenter).join(':')
940941

941942
if !@dse && ENV['CASSANDRA_DIR'] && !ENV['CASSANDRA_DIR'].empty?
@@ -996,9 +997,9 @@ def create_cluster(name, version, datacenters, nodes_per_datacenter)
996997
config << 'max_hints_delivery_threads: 1'
997998

998999
# If we're just dealing with C* 4.0 enable MV as well
999-
#if cassandra_version >= '4.0'
1000-
# config << 'enable_materialized_views: true'
1001-
#end
1000+
if cassandra_version >= '3.0' and !dse
1001+
config << 'enable_materialized_views: true'
1002+
end
10021003

10031004
ccm.exec('updateconf', *config)
10041005
ccm.exec('populate', '-n', nodes, '-i', '127.0.0.')

0 commit comments

Comments
 (0)
Please sign in to comment.