-
Notifications
You must be signed in to change notification settings - Fork 95
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
fix(test_user_batch_custom_time): handle stress command correctly #9345
Conversation
856cab9
to
048911f
Compare
048911f
to
34c1090
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix unit tests
seems like we were running into situations we try to add all nodes ips into stress commands, and it's the test code ``` File ".../longevity_test.py", line 300, in test_user_batch_custom_time self._run_user_stress_in_batches(batch_size=batch_size, File ".../longevity_test.py", line 336, in _run_user_stress_in_batches batch_params['stress_cmd'] += [params['stress_cmd'] + nodes_ips] TypeError: list indices must be integers or slices, not str ``` in this change remove a parentheses that was causing function to return tuple and not string as expected
34c1090
to
a508927
Compare
# for now we'll leave to just one fresh table, to kick schema update | ||
num_of_newly_created_tables = 1 | ||
self._pre_create_templated_user_schema(batch_start=extra_tables_idx, | ||
batch_end=extra_tables_idx+num_of_newly_created_tables) | ||
for i in range(num_of_newly_created_tables): | ||
batch.append(self.create_templated_user_stress_params(extra_tables_idx + i, cs_profile=cs_profile)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the core of the fix
the test in 2024.2 reproducers, did proved this is fixing the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -109,6 +109,8 @@ pipeline { | |||
steps { | |||
script { | |||
try { | |||
checkoutQaInternal(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cause the unittest is going via code path that depends on configuration files existing in the internal repo
i.e. the 5000 tables case has the user profile yaml there.
seems like we were running into situations we try to add all nodes ips into stress commands, and it's the test code
in this change remove a parentheses that was causing function to return tuple and not string as expected
Testing
PR pre-checks (self review)
backport
labelsReminders
sdcm/sct_config.py
)unit-test/
folder)