@@ -113,12 +113,21 @@ def _test_rolling_upgrade(self, path, nodes):
113
113
c .execute ("deny dql on table doc.t1 to arthur" )
114
114
c .execute ("CREATE VIEW doc.v1 AS SELECT type, title, value FROM doc.t1" )
115
115
insert_data (conn , 'doc' , 't1' , 1000 )
116
-
117
116
c .execute ("INSERT INTO doc.t1 (type, value, title, author) VALUES (1, 1, 'matchMe title', {name='no match name'})" )
118
117
c .execute ("INSERT INTO doc.t1 (type, value, title, author) VALUES (2, 2, 'no match title', {name='matchMe name'})" )
119
-
120
118
c .execute ("INSERT INTO doc.t1 (title, author, o) VALUES ('prefix_check', {\" dyn_empty_array\" = []}, {\" dyn_ignored_subcol\" = 'hello'})" )
121
119
120
+ c .execute ('''
121
+ create table doc.t2 (
122
+ a int primary key,
123
+ b int not null,
124
+ c int default random() * 100,
125
+ d generated always as (a + b + c),
126
+ constraint d CHECK (d > a + b)
127
+ ) clustered into 1 shards with (number_of_replicas = 0)
128
+ ''' )
129
+ expected_active_shards += 1
130
+
122
131
c .execute ('''
123
132
CREATE FUNCTION foo(INT)
124
133
RETURNS INT
@@ -266,6 +275,13 @@ def _test_rolling_upgrade(self, path, nodes):
266
275
# Add the shards of the new partition primaries
267
276
expected_active_shards += shards
268
277
278
+ c .execute ("select count(*) from doc.t2" )
279
+ count = c .fetchall ()[0 ][0 ]
280
+ c .execute (f"insert into doc.t2(a, b) values ({ idx } , { idx } )" )
281
+ c .execute ("refresh table t2" )
282
+ c .execute ("select count(*) from doc.t2" )
283
+ self .assertEqual (c .fetchall ()[0 ][0 ], count + 1 )
284
+
269
285
# skip 5.5 -> 5.6 and later versions, they fail due to https://github.com/crate/crate/issues/17734
270
286
if int (path .to_version .split ('.' )[1 ]) < 5 :
271
287
with connect (replica_cluster .node ().http_url , error_trace = True ) as replica_conn :
0 commit comments