Skip to content

Commit 28f7ffa

Browse files
committed
Address comments.
1 parent ea031b8 commit 28f7ffa

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

test/cluster/sandbox/fix_served_types_test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
dict(tablet_type=topodata_pb2.RDONLY),
1919
])
2020

21+
_just_master = dict(
22+
served_types=[
23+
dict(tablet_type=topodata_pb2.MASTER),
24+
])
25+
2126

2227
class FixServedTypesTest(unittest.TestCase):
2328

@@ -27,7 +32,7 @@ def test_get_vtctl_commands(self):
2732
[('-80', _all_types), ('80-', _all_types), ('0', {})],
2833
[('-80', {}), ('80-', {}), ('0', _all_types)],
2934
[('-80', {}), ('80-', _all_types), ('0', _all_types)],
30-
[('-80', {}), ('80-', _no_master), ('0', _all_types)]
35+
[('-80', _no_master), ('80-', _no_master), ('0', _just_master)]
3136
]]
3237

3338
expected_results = [
@@ -59,7 +64,9 @@ def test_get_vtctl_commands(self):
5964
['SetShardServedTypes', 'foo/0', 'rdonly'],
6065
['SetShardServedTypes', 'foo/0', 'master']],
6166

62-
[['SetShardServedTypes', '--remove', 'foo/80-', 'replica'],
67+
[['SetShardServedTypes', '--remove', 'foo/-80', 'replica'],
68+
['SetShardServedTypes', '--remove', 'foo/-80', 'rdonly'],
69+
['SetShardServedTypes', '--remove', 'foo/80-', 'replica'],
6370
['SetShardServedTypes', '--remove', 'foo/80-', 'rdonly'],
6471
['SetShardServedTypes', 'foo/0', 'replica'],
6572
['SetShardServedTypes', 'foo/0', 'rdonly'],

test/cluster/sandbox/vitess_kubernetes_sandbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def generate_helm_sandlet(self):
230230
helm_sandlet.components.add_component(wait_for_mysql_subprocess)
231231

232232
# Add a subprocess task to ensure serving types are correct. This is useful
233-
# for resharding sandboxes where multiple keyspaces share a name.
233+
# for resharding sandboxes where keyspaces have overlapping sets of shards.
234234
fix_served_types_subprocess = subprocess_component.Subprocess(
235235
'fix_served_types', self.name, 'fix_served_types.py', self.log_dir,
236236
namespace=self.name,

0 commit comments

Comments
 (0)