Skip to content

Commit c4c218f

Browse files
committed
unexpected UserAlreadyExistsException
1 parent 2207a1c commit c4c218f

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

tests/bwc/test_upgrade.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class MetaDataCompatibilityTest(NodeProvider, unittest.TestCase):
191191
SUPPORTED_VERSIONS = (
192192
VersionDef('2.3.x', []),
193193
VersionDef('3.3.x', []),
194-
VersionDef('branch:jeeminso/temp-8', []),
194+
VersionDef('branch:jeeminso/temp8', []),
195195
)
196196

197197
def test_metadata_compatibility(self):
@@ -207,16 +207,16 @@ def test_metadata_compatibility(self):
207207
with connect(cluster.node().http_url, error_trace=True) as conn:
208208
cursor = conn.cursor()
209209
cursor.execute('''
210-
CREATE USER user_a;
210+
revoke all privileges on schema doc from user_a
211211
''')
212212
cursor.execute('''
213-
GRANT ALL PRIVILEGES ON SCHEMA doc TO user_a;
213+
drop user if exists user_a
214+
''')
215+
cursor.execute('''
216+
CREATE USER user_a;
214217
''')
215218
cursor.execute('''
216-
CREATE FUNCTION fact(LONG)
217-
RETURNS LONG
218-
LANGUAGE JAVASCRIPT
219-
AS 'function fact(a) { return a < 2 ? 0 : a * (a - 1); }';
219+
GRANT ALL PRIVILEGES ON SCHEMA doc TO user_a;
220220
''')
221221
self._process_on_stop()
222222

@@ -251,14 +251,4 @@ def assert_meta_data(self, version_def, nodes, data_paths=None):
251251
self.assertEqual([['user_a', False], ['crate', True]], rs)
252252
self.assertEqual(['user_a', False], rs[0])
253253
self.assertEqual(['crate', True], rs[1])
254-
cursor.execute('''
255-
SELECT fact(100);
256-
''')
257-
self.assertEqual(9900, cursor.fetchone()[0])
258-
cursor.execute('''
259-
SELECT class, grantee, ident, state, type
260-
FROM sys.privileges
261-
ORDER BY class, grantee, ident, state, type
262-
''')
263-
264254
self._process_on_stop()

0 commit comments

Comments
 (0)