This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new 24a677ac Configure auditlog and fqltool tests to do chronicle-queue
file-shrinking synchronously
24a677ac is described below
commit 24a677ac420ec64b98164c37a346dc5384582a7c
Author: Mick Semb Wever <[email protected]>
AuthorDate: Sat Mar 11 23:32:22 2023 +0100
Configure auditlog and fqltool tests to do chronicle-queue file-shrinking
synchronously
patch by Mick Semb Wever; reviewed by Ekaterina Dimitrova for
CASSANDRA-18049
---
auditlog_test.py | 12 +++++++-----
fqltool_test.py | 11 ++++++-----
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/auditlog_test.py b/auditlog_test.py
index eb16d6bd..76d022e4 100644
--- a/auditlog_test.py
+++ b/auditlog_test.py
@@ -14,6 +14,8 @@ from dtest import Tester
since = pytest.mark.since
logger = logging.getLogger(__name__)
+JVM_ARGS = ['-Dchronicle.queue.synchronousFileShrinking=true']
+
@since('4.0')
class TestAuditlog(Tester):
def test_archiving(self):
@@ -24,7 +26,7 @@ class TestAuditlog(Tester):
'audit_logs_dir': log_dir,
'roll_cycle': 'TEST_SECONDLY',
'archive_command':'%s %%path'%(move_script)}})
- cluster.populate(1).start()
+ cluster.populate(1).start(jvm_args=JVM_ARGS)
node = cluster.nodelist()[0]
node.stress(['write', 'n=100k', "no-warmup", "cl=ONE", "-rate",
"threads=300"])
node.nodetool("disableauditlog")
@@ -38,7 +40,7 @@ class TestAuditlog(Tester):
moved_log_dir, move_script = self._create_script()
cluster.set_configuration_options(values={'full_query_logging_options':
{'log_dir': log_dir,
'archive_command': 'conf should not be used'}})
- cluster.populate(1).start()
+ cluster.populate(1).start(jvm_args=JVM_ARGS)
node = cluster.nodelist()[0]
node.nodetool("enablefullquerylog --archive-command \"%s %%path\"
--roll-cycle=TEST_SECONDLY"%move_script)
node.stress(['write', 'n=100k', "no-warmup", "cl=ONE", "-rate",
"threads=300"])
@@ -58,7 +60,7 @@ class TestAuditlog(Tester):
cluster.set_configuration_options(values={'full_query_logging_options':
{'log_dir': log_dir,
'roll_cycle': 'TEST_SECONDLY',
'archive_command':'%s %%path'%(move_script)}})
- cluster.populate(1).start()
+ cluster.populate(1).start(jvm_args=JVM_ARGS)
node = cluster.nodelist()[0]
node.nodetool("enablefullquerylog")
node.stress(['write', 'n=100k', "no-warmup", "cl=ONE", "-rate",
"threads=300"])
@@ -93,7 +95,7 @@ class TestAuditlog(Tester):
cluster.set_configuration_options(values={'full_query_logging_options':
{'log_dir': log_dir,
'roll_cycle': 'TEST_SECONDLY',
'archive_command':'%s %%path'%(move_script)}})
- cluster.populate(1).start()
+ cluster.populate(1).start(jvm_args=JVM_ARGS)
node = cluster.nodelist()[0]
node.nodetool("enablefullquerylog")
@@ -110,7 +112,7 @@ class TestAuditlog(Tester):
cluster.set_configuration_options(values={'full_query_logging_options':
{'log_dir': log_dir,
'roll_cycle': 'TEST_SECONDLY',
'archive_command':'%s %%path'%(move_script)}})
- cluster.populate(1).start()
+ cluster.populate(1).start(jvm_args=JVM_ARGS)
node = cluster.nodelist()[0]
node.nodetool("enablefullquerylog")
diff --git a/fqltool_test.py b/fqltool_test.py
index cfe590c4..4b4f379a 100644
--- a/fqltool_test.py
+++ b/fqltool_test.py
@@ -10,6 +10,7 @@ from shutil import rmtree
since = pytest.mark.since
logger = logging.getLogger(__name__)
+JVM_ARGS = ['-Dchronicle.queue.synchronousFileShrinking=true']
@since('4.0')
class TestFQLTool(Tester):
@@ -23,7 +24,7 @@ class TestFQLTool(Tester):
query log, then makes sure that the data is correct.
@jira_ticket CASSANDRA-14690
"""
- self.cluster.populate(2).start()
+ self.cluster.populate(2).start(jvm_args=JVM_ARGS)
node1, node2 = self.cluster.nodelist()
with tempfile.TemporaryDirectory() as temp_dir:
@@ -61,7 +62,7 @@ class TestFQLTool(Tester):
sure that the results match
@jira_ticket CASSANDRA-14690
"""
- self.cluster.populate(1).start()
+ self.cluster.populate(1).start(jvm_args=JVM_ARGS)
node1 = self.cluster.nodelist()[0]
with tempfile.TemporaryDirectory() as temp_dir:
@@ -87,7 +88,7 @@ class TestFQLTool(Tester):
then asserts that the replays of each generates a mismatch
@jira_ticket CASSANDRA-14690
"""
- self.cluster.populate(1).start()
+ self.cluster.populate(1).start(jvm_args=JVM_ARGS)
node1 = self.cluster.nodelist()[0]
with tempfile.TemporaryDirectory() as temp_dir:
@@ -134,7 +135,7 @@ class TestFQLTool(Tester):
def test_jvmdtest(self):
""" mimics the behavior of the in-jvm dtest, see CASSANDRA-16720 """
- self.cluster.populate(1).start()
+ self.cluster.populate(1).start(jvm_args=JVM_ARGS)
node1 = self.cluster.nodelist()[0]
session = self.patient_cql_connection(node1)
@@ -165,7 +166,7 @@ class TestFQLTool(Tester):
test that fql can be enabled on a dirty directory
@jira_ticket CASSANDRA-17136
"""
- self.cluster.populate(1).start()
+ self.cluster.populate(1).start(jvm_args=JVM_ARGS)
node1 = self.cluster.nodelist()[0]
with tempfile.TemporaryDirectory() as temp_dir:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]