scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
22 stars 66 forks source link

ccmlib/common: remove prints from `wait_for` #466

Closed fruch closed 1 year ago

fruch commented 1 year ago

remove text parameter from wait_for it was spamming the outout for now real reason. we should be print to stdout during tests. for debug propuses we should be using logging.debug, which in this case isn't needed.

Fixes: #465

kbr-scylla commented 1 year ago

This will break a bunch of dtests tho:

[kbraun@fedora scylla-dtest]$ git grep "wait_for.*text="
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, step=3, text='Waiting until table schema is updated',
cdc_test.py:        wait_for(check_metadata, timeout=60, text='Waiting until metadata is updated')
dtest_class.py:def forever_wait_for(func, step=1, text=None, **kwargs):
dtest_class.py:def wait_for(func, step=1, text=None, timeout=None, throw_exc=True, **kwargs):
dtest_scylla_manager.py:            is_status_reached = wait_for(func=self.is_status_in_list, step=step, text=text, list_status=list_status,
ics_compaction_test.py:        wait_for(func=is_compaction_executed, text=str(is_compaction_executed),
internode_ssl_test.py:                wait_for(is_port_used, text=f'Waiting port {port} is used', step=0.5, timeout=2,
manager_backup_tests.py:        is_status_reached = wait_for(func=self._is_node_at_status, step=step, text=text, timeout=timeout, throw_exc=True,
manager_general_tests.py:        wait_for(func=has_removed_node_reached_dn, step=step, text="Node status has yet to reach DN", timeout=timeout,
native_transport_ssl_test.py:                wait_for(is_port_used, text=f'Waiting port {port} is used', step=0.5, timeout=2,
tools/cdc_utils.py:        wait_for(check_metadata, timeout=60, text='Waiting until metadata is updated')
fruch commented 1 year ago

This will break a bunch of dtests tho:

[kbraun@fedora scylla-dtest]$ git grep "wait_for.*text="
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, text='Waiting until table schema is updated',
alternator_tests.py:        wait_for(self.is_table_schema_synced, timeout=30, step=3, text='Waiting until table schema is updated',
cdc_test.py:        wait_for(check_metadata, timeout=60, text='Waiting until metadata is updated')
dtest_class.py:def forever_wait_for(func, step=1, text=None, **kwargs):
dtest_class.py:def wait_for(func, step=1, text=None, timeout=None, throw_exc=True, **kwargs):
dtest_scylla_manager.py:            is_status_reached = wait_for(func=self.is_status_in_list, step=step, text=text, list_status=list_status,
ics_compaction_test.py:        wait_for(func=is_compaction_executed, text=str(is_compaction_executed),
internode_ssl_test.py:                wait_for(is_port_used, text=f'Waiting port {port} is used', step=0.5, timeout=2,
manager_backup_tests.py:        is_status_reached = wait_for(func=self._is_node_at_status, step=step, text=text, timeout=timeout, throw_exc=True,
manager_general_tests.py:        wait_for(func=has_removed_node_reached_dn, step=step, text="Node status has yet to reach DN", timeout=timeout,
native_transport_ssl_test.py:                wait_for(is_port_used, text=f'Waiting port {port} is used', step=0.5, timeout=2,
tools/cdc_utils.py:        wait_for(check_metadata, timeout=60, text='Waiting until metadata is updated')

it's a function with the same name, but dtest has its own implementation (even that is quite similar)