@@ -191,11 +191,12 @@ class MetaDataCompatibilityTest(NodeProvider, unittest.TestCase):
191191 SUPPORTED_VERSIONS = (
192192 VersionDef ('2.3.x' , []),
193193 VersionDef ('3.3.x' , []),
194+ VersionDef ('5.10.13' , []),
194195 VersionDef ('6.0.0' , []),
195196 )
196197
197198 def test_metadata_compatibility (self ):
198- nodes = 1
199+ nodes = 3
199200
200201 cluster = self ._new_cluster (
201202 self .SUPPORTED_VERSIONS [0 ].version ,
@@ -206,18 +207,18 @@ def test_metadata_compatibility(self):
206207 cluster .start ()
207208 with connect (cluster .node ().http_url , error_trace = True ) as conn :
208209 cursor = conn .cursor ()
209- cursor .execute ('''
210- revoke all privileges on schema doc from user_a
211- ''' )
212- cursor .execute ('''
213- drop user if exists user_a
214- ''' )
215210 cursor .execute ('''
216211 CREATE USER user_a;
217212 ''' )
218213 cursor .execute ('''
219214 GRANT ALL PRIVILEGES ON SCHEMA doc TO user_a;
220215 ''' )
216+ cursor .execute ('''
217+ CREATE FUNCTION fact(LONG)
218+ RETURNS LONG
219+ LANGUAGE JAVASCRIPT
220+ AS 'function fact(a) { return a < 2 ? 0 : a * (a - 1); }';
221+ ''' )
221222 self ._process_on_stop ()
222223
223224 paths = [node ._settings ['path.data' ] for node in cluster .nodes ()]
@@ -251,4 +252,14 @@ def assert_meta_data(self, version_def, nodes, data_paths=None):
251252 self .assertEqual ([['user_a' , False ], ['crate' , True ]], rs )
252253 self .assertEqual (['user_a' , False ], rs [0 ])
253254 self .assertEqual (['crate' , True ], rs [1 ])
255+ cursor .execute ('''
256+ SELECT fact(100);
257+ ''' )
258+ self .assertEqual (9900 , cursor .fetchone ()[0 ])
259+ cursor .execute ('''
260+ SELECT class, grantee, ident, state, type
261+ FROM sys.privileges
262+ ORDER BY class, grantee, ident, state, type
263+ ''' )
264+
254265 self ._process_on_stop ()
0 commit comments