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

rptest: invalid comparison in test_max_connections #16133

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

travisdowns
Copy link
Member

We comared a list to a float, which will fail at runtime. Presumably we don't hit this case when the test passes but we can hit it for some failures.

This bug was found through typing.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

We comared a list to a float, which will fail at runtime. Presumably
we don't hit this case when the test passes but we can hit it for
some failures.

This bug was found through typing.
@@ -604,7 +604,7 @@ def swarm_start(node):
if (len(swarm) - calc_alive_swarm_nodes(swarm)) > 1:
break
elif _elapsed > FINISH_TIMEOUT_SEC and \
_connections < (self._advertised_max_client_count * 0.01):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_connections is a list (this used to work, but _connections type was changed at some point), _total is the sum of all values in connections and is the correct lhs for this test

Copy link
Member

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@travisdowns travisdowns merged commit 48d0729 into redpanda-data:dev Jan 18, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants