Unit Test Results.

Designed for use with JUnit and Ant.

All Failures

ClassNameStatusTypeTime(s)
8_cythonno_x86_64_12_64test_movementFailureAssertionError: values not within 5.00% of the max: (649.07, 611.96) ()

self = <topology_test.TestTopology object at 0x7fd5a4479a60>

@pytest.mark.no_vnodes
def test_movement(self):
cluster = self.cluster

# Create an unbalanced ring
cluster.populate(3, tokens=[0, 2**48, 2**62]).start()
node1, node2, node3 = cluster.nodelist()

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

insert_c1c2(session, n=30000, consistency=ConsistencyLevel.ONE)

cluster.flush()

# Move nodes to balance the cluster
def move_node(node, token):
mark = node.mark_log()
node.move(token) # can't assume 0 is balanced with m3p
node.watch_log_for('{} state jump to NORMAL'.format(node.address_for_current_version()), from_mark=mark, timeout=180)
time.sleep(3)

balancing_tokens = cluster.balanced_tokens(3)

move_node(node1, balancing_tokens[0])
move_node(node2, balancing_tokens[1])
move_node(node3, balancing_tokens[2])

time.sleep(1)
cluster.cleanup()
for node in cluster.nodelist():
# after moving nodes we need to relocate any tokens in the wrong places, and after doing that
# we might have overlapping tokens on the disks, so run a major compaction to get balance even
if cluster.version() >= '3.2':
node.nodetool("relocatesstables")
node.nodetool("compact")

# Check we can get all the keys
for n in range(0, 30000):
query_c1c2(session, n, ConsistencyLevel.ONE)

# Now the load should be basically even
sizes = [node.data_size() for node in [node1, node2, node3]]

> assert_almost_equal(sizes[0], sizes[1], error=0.05)

topology_test.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (649.07, 611.96), kwargs = {'error': 0.05}, error = 0.05, vmax = 649.07
vmin = 611.96, error_message = ''

def assert_almost_equal(*args, **kwargs):
"""
Assert variable number of arguments all fall within a margin of error.
@params *args variable number of numerical arguments to check
@params error Optional margin of error. Default 0.16
@params error_message Optional error message to print. Default ''

Examples:
assert_almost_equal(sizes[2], init_size)
assert_almost_equal(ttl_session1, ttl_session2[0][0], error=0.005)
"""
error = kwargs['error'] if 'error' in kwargs else 0.16
vmax = max(args)
vmin = min(args)
error_message = '' if 'error_message' not in kwargs else kwargs['error_message']
> assert vmin > vmax * (1.0 - error) or vmin == vmax, \
"values not within {:.2f}% of the max: {} ({})".format(error * 100, args, error_message)
E AssertionError: values not within 5.00% of the max: (649.07, 611.96) ()

tools/assertions.py:205: AssertionError
145.143
8_cythonno_x86_64_18_64test_multi_partition_consistent_reads_after_writeFailureFailed: Timeout >900.0s

self = <materialized_views_test.TestMaterializedViewsConsistency object at 0x7f0a4b908550>

def test_multi_partition_consistent_reads_after_write(self):
"""
Tests consistency of multiple writes to a multiple partitions

@jira_ticket CASSANDRA-10981
"""
> self._consistent_reads_after_write_test(5)

materialized_views_test.py:2846:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <materialized_views_test.TestMaterializedViewsConsistency object at 0x7f0a4b908550>
num_partitions = 5

def _consistent_reads_after_write_test(self, num_partitions):

session = self.prepare()
node1, node2, node3 = self.cluster.nodelist()

# Test config
lower = 0
upper = 100000
processes = 4
queues = [None] * processes
eachProcess = (upper - lower) // processes

logger.debug("Creating schema")
session.execute(
("CREATE KEYSPACE IF NOT EXISTS mvtest WITH replication = "
"{'class': 'SimpleStrategy', 'replication_factor': '3'}")
)
session.execute(
"CREATE TABLE mvtest.test1 (a int, b int, c int, d int, PRIMARY KEY (a,b))"
)
session.cluster.control_connection.wait_for_schema_agreement()

insert1 = session.prepare("INSERT INTO mvtest.test1 (a,b,c,d) VALUES (?,?,?,?)")
insert1.consistency_level = writeConsistency

logger.debug("Writing data to base table")
for i in range(upper // 10):
self._do_row(insert1, i, num_partitions)

logger.debug("Creating materialized view")
session.execute(
('CREATE MATERIALIZED VIEW mvtest.mv1 AS '
'SELECT a,b,c,d FROM mvtest.test1 WHERE a IS NOT NULL AND b IS NOT NULL AND '
'c IS NOT NULL PRIMARY KEY (c,a,b)')
)
session.cluster.control_connection.wait_for_schema_agreement()

logger.debug("Writing more data to base table")
for i in range(upper // 10, upper):
self._do_row(insert1, i, num_partitions)

# Wait that all requests are done
while self.num_request_done < upper:
> time.sleep(1)
E Failed: Timeout >900.0s

materialized_views_test.py:2891: Failed
906.385