Skip to content

Commit 94c2288

Browse files
committed
unexpected UserAlreadyExistsException
1 parent 2207a1c commit 94c2288

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/bwc/test_upgrade.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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,5 @@ 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-
''')
263254

264255
self._process_on_stop()

0 commit comments

Comments
 (0)