Skip to content

Commit

Permalink
Add sys.nodes query to rolling upgrade test
Browse files Browse the repository at this point in the history
  • Loading branch information
BaurzhanSakhariev committed Jul 31, 2024
1 parent f661249 commit d40311d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/bwc/test_rolling_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ def _test_rolling_upgrade(self, path, nodes):
expected_active_shards += shards

for idx, node in enumerate(cluster):
# Enforce an old version node be a handler to make sure that an upgraded node can serve 'select *' from an old version node.
# Otherwise upgraded node simply requests N-1 columns from old version with N columns and it always works.
# Was a regression for 5.7 <-> 5.8
with connect(node.http_url, error_trace=True) as old_node_conn:
c = old_node_conn.cursor()
c.execute('''
SELECT * from sys.nodes
''')
res = c.fetchall()
self.assertEqual(len(res), 3)

print(f" upgrade node {idx} to {path.to_version}")
new_node = self.upgrade_node(node, path.to_version)
cluster[idx] = new_node
Expand Down

0 comments on commit d40311d

Please sign in to comment.