Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAR-806: Changes from OSS - DO NOT MERGE #31

Draft
wants to merge 20 commits into
base: ds-trunk
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f1e441e
STAR-564 Check only MODIFY on base when updating table with MV (#17)
jtgrabowski Jun 1, 2021
f2c3701
Add pytest cache and vscode folders to gitignore (#21)
k-rus Jun 8, 2021
a02abc6
STAR-582 fix repair error on one node cluster (#20)
k-rus Jun 11, 2021
c204342
STAR-247: Allow to easily run tests against big or bti sstable format
jacek-lewandowski Apr 2, 2021
c733919
STAR-247: remove format specific parts of assertions
jtgrabowski Apr 6, 2021
1253168
STAR-247: Standalone scrubber should use the same default sstable for…
jacek-lewandowski Jun 23, 2021
f7684e4
STAR-247: Add allowed warning for running scrub test
jacek-lewandowski Jun 23, 2021
ee9b612
STAR-14: Fix expectations to include memtable table parameter
blambov Apr 12, 2021
3a6ba36
STAR-254: add DateRange and Geo tests (#9)
jtgrabowski Apr 20, 2021
af5e094
STAR-452: add EverywhereStrategy smoke test (#10)
jtgrabowski Apr 21, 2021
9fbd1b3
STAR-431: Add option to prevent any file-I/O from cqlsh
mfleming May 24, 2021
72eedea
STAR-431: Add more tests to make sure commands work without --no-file…
mfleming May 25, 2021
e6ae1bf
STAR-432: Add tests for consistency level options (#18)
tlasica Jun 1, 2021
fd2b1c3
STAR-543: Port guardrail tests and changes (#19)
djatnieks Jun 8, 2021
50bf851
STAR-765: Add tests for cloud connection. (#23)
tlasica Jun 16, 2021
0905211
STAR-386: Add logging around failure to get timestamp info (#28)
djatnieks Jun 24, 2021
4c7c22c
STAR-564 Check only MODIFY on base when updating table with MV (#17)
jtgrabowski Jun 1, 2021
ba91f9d
Add pytest cache and vscode folders to gitignore (#21)
k-rus Jun 8, 2021
387d688
STAR-582 fix repair error on one node cluster (#20)
k-rus Jun 11, 2021
6b91cb6
Merge remote-tracking branch 'datastax/STAR-99' into STAR-806-merge-d…
jacek-lewandowski Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
STAR-452: add EverywhereStrategy smoke test (#10)
(cherry picked from commit eb3049c)
(cherry picked from commit fe23e0b)
jtgrabowski authored and jacek-lewandowski committed Jun 25, 2021
commit af5e094eb6ad961c9aee0ab465f128908ca1bcfa
51 changes: 51 additions & 0 deletions bootstrap_test.py
Original file line number Diff line number Diff line change
@@ -1018,6 +1018,57 @@ def test_bootstrap_binary_disabled(self):
assert_bootstrap_state(self, node3, 'COMPLETED', user='cassandra', password='cassandra')
node3.wait_for_binary_interface()

@since('4.0')
@pytest.mark.no_vnodes
def test_simple_bootstrap_with_everywhere_strategy(self):
cluster = self.cluster
tokens = cluster.balanced_tokens(2)
cluster.set_configuration_options(values={'num_tokens': 1})

logger.debug("[node1, node2] tokens: %r" % (tokens,))

keys = 10000

# Create a single node cluster
cluster.populate(1)
node1 = cluster.nodelist()[0]
node1.set_configuration_options(values={'initial_token': tokens[0]})
cluster.start()

session = self.patient_cql_connection(node1)
create_ks(session, 'ks', 'EverywhereStrategy')
create_cf(session, 'cf', columns={'c1': 'text', 'c2': 'text'})

insert_statement = session.prepare("INSERT INTO ks.cf (key, c1, c2) VALUES (?, 'value1', 'value2')")
execute_concurrent_with_args(session, insert_statement, [['k%d' % k] for k in range(keys)])

node1.flush()
node1.compact()

# Reads inserted data all during the bootstrap process. We shouldn't
# get any error
query_c1c2(session, random.randint(0, keys - 1), ConsistencyLevel.ONE)
session.shutdown()

# Bootstrapping a new node in the current version
node2 = new_node(cluster)
node2.set_configuration_options(values={'initial_token': tokens[1]})
node2.start(wait_for_binary_proto=True)
node2.compact()

node1.cleanup()
logger.debug("node1 size for ks.cf after cleanup: %s" % float(data_size(node1,'ks','cf')))
node1.compact()
logger.debug("node1 size for ks.cf after compacting: %s" % float(data_size(node1,'ks','cf')))

logger.debug("node2 size for ks.cf after compacting: %s" % float(data_size(node2,'ks','cf')))

size1 = float(data_size(node1,'ks','cf'))
size2 = float(data_size(node2,'ks','cf'))
assert_almost_equal(size1, size2, error=0.3)

assert_bootstrap_state(self, node2, 'COMPLETED')

@since('4.1')
def test_invalid_host_id(self):
"""
2 changes: 2 additions & 0 deletions dtest.py
Original file line number Diff line number Diff line change
@@ -359,6 +359,8 @@ def create_ks(session, name, rf):
if isinstance(rf, int):
# we assume simpleStrategy
query = query % (name, "'class':'SimpleStrategy', 'replication_factor':%d" % rf)
elif 'EverywhereStrategy' in rf:
query = query % (name, "'class':'org.apache.cassandra.locator.EverywhereStrategy'")
else:
assert len(rf) >= 0, "At least one datacenter/rf pair is needed"
# we assume networkTopologyStrategy