@@ -194,8 +194,8 @@ private void invalidationResultSetTest(
194194 Consumer <CqlSession > setupTestSchema , Set <String > expectedChangedTypes ) {
195195 invalidationTestInner (
196196 setupTestSchema ,
197- "select f from test_table_1 where e = ?" ,
198- "select h from test_table_2 where g = ?" ,
197+ "select f from test_table_caching_1 where e = ?" ,
198+ "select h from test_table_caching_2 where g = ?" ,
199199 expectedChangedTypes );
200200 }
201201
@@ -206,8 +206,8 @@ private void invalidationVariableDefsTest(
206206 String condition = isCollection ? "contains ?" : "= ?" ;
207207 invalidationTestInner (
208208 setupTestSchema ,
209- String .format ("select e from test_table_1 where f %s allow filtering" , condition ),
210- String .format ("select g from test_table_2 where h %s allow filtering" , condition ),
209+ String .format ("select e from test_table_caching_1 where f %s allow filtering" , condition ),
210+ String .format ("select g from test_table_caching_2 where h %s allow filtering" , condition ),
211211 expectedChangedTypes );
212212 }
213213
@@ -263,8 +263,8 @@ private void invalidationTestInner(
263263 preparedStmtCacheRemoveLatch .countDown ();
264264 });
265265
266- // alter test_type_2 to trigger cache invalidation and above events
267- session .execute ("ALTER TYPE test_type_2 add i blob" );
266+ // alter test_type_caching_2 to trigger cache invalidation and above events
267+ session .execute ("ALTER TYPE test_type_caching_2 add i blob" );
268268
269269 session .checkSchemaAgreement ();
270270
@@ -297,17 +297,20 @@ private void invalidationTestInner(
297297
298298 Consumer <CqlSession > setupCacheEntryTestBasic =
299299 (session ) -> {
300- session .execute ("CREATE TYPE test_type_1 (a text, b int)" );
301- session .execute ("CREATE TYPE test_type_2 (c int, d text)" );
302- session .execute ("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)" );
303- session .execute ("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)" );
300+ session .execute ("CREATE TYPE test_type_caching_1 (a text, b int)" );
301+ session .execute ("CREATE TYPE test_type_caching_2 (c int, d text)" );
302+ session .execute (
303+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)" );
304+ session .execute (
305+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)" );
304306 };
305307
306308 @ Test
307309 public void should_invalidate_cache_entry_on_basic_udt_change_result_set () {
308310 SchemaChangeSynchronizer .withLock (
309311 () -> {
310- invalidationResultSetTest (setupCacheEntryTestBasic , ImmutableSet .of ("test_type_2" ));
312+ invalidationResultSetTest (
313+ setupCacheEntryTestBasic , ImmutableSet .of ("test_type_caching_2" ));
311314 });
312315 }
313316
@@ -316,25 +319,26 @@ public void should_invalidate_cache_entry_on_basic_udt_change_variable_defs() {
316319 SchemaChangeSynchronizer .withLock (
317320 () -> {
318321 invalidationVariableDefsTest (
319- setupCacheEntryTestBasic , false , ImmutableSet .of ("test_type_2 " ));
322+ setupCacheEntryTestBasic , false , ImmutableSet .of ("test_type_caching_2 " ));
320323 });
321324 }
322325
323326 Consumer <CqlSession > setupCacheEntryTestCollection =
324327 (session ) -> {
325- session .execute ("CREATE TYPE test_type_1 (a text, b int)" );
326- session .execute ("CREATE TYPE test_type_2 (c int, d text)" );
328+ session .execute ("CREATE TYPE test_type_caching_1 (a text, b int)" );
329+ session .execute ("CREATE TYPE test_type_caching_2 (c int, d text)" );
327330 session .execute (
328- "CREATE TABLE test_table_1 (e int primary key, f list<frozen<test_type_1 >>)" );
331+ "CREATE TABLE test_table_caching_1 (e int primary key, f list<frozen<test_type_caching_1 >>)" );
329332 session .execute (
330- "CREATE TABLE test_table_2 (g int primary key, h list<frozen<test_type_2 >>)" );
333+ "CREATE TABLE test_table_caching_2 (g int primary key, h list<frozen<test_type_caching_2 >>)" );
331334 };
332335
333336 @ Test
334337 public void should_invalidate_cache_entry_on_collection_udt_change_result_set () {
335338 SchemaChangeSynchronizer .withLock (
336339 () -> {
337- invalidationResultSetTest (setupCacheEntryTestCollection , ImmutableSet .of ("test_type_2" ));
340+ invalidationResultSetTest (
341+ setupCacheEntryTestCollection , ImmutableSet .of ("test_type_caching_2" ));
338342 });
339343 }
340344
@@ -343,25 +347,26 @@ public void should_invalidate_cache_entry_on_collection_udt_change_variable_defs
343347 SchemaChangeSynchronizer .withLock (
344348 () -> {
345349 invalidationVariableDefsTest (
346- setupCacheEntryTestCollection , true , ImmutableSet .of ("test_type_2 " ));
350+ setupCacheEntryTestCollection , true , ImmutableSet .of ("test_type_caching_2 " ));
347351 });
348352 }
349353
350354 Consumer <CqlSession > setupCacheEntryTestTuple =
351355 (session ) -> {
352- session .execute ("CREATE TYPE test_type_1 (a text, b int)" );
353- session .execute ("CREATE TYPE test_type_2 (c int, d text)" );
356+ session .execute ("CREATE TYPE test_type_caching_1 (a text, b int)" );
357+ session .execute ("CREATE TYPE test_type_caching_2 (c int, d text)" );
354358 session .execute (
355- "CREATE TABLE test_table_1 (e int primary key, f tuple<int, test_type_1 , text>)" );
359+ "CREATE TABLE test_table_caching_1 (e int primary key, f tuple<int, test_type_caching_1 , text>)" );
356360 session .execute (
357- "CREATE TABLE test_table_2 (g int primary key, h tuple<text, test_type_2 , int>)" );
361+ "CREATE TABLE test_table_caching_2 (g int primary key, h tuple<text, test_type_caching_2 , int>)" );
358362 };
359363
360364 @ Test
361365 public void should_invalidate_cache_entry_on_tuple_udt_change_result_set () {
362366 SchemaChangeSynchronizer .withLock (
363367 () -> {
364- invalidationResultSetTest (setupCacheEntryTestTuple , ImmutableSet .of ("test_type_2" ));
368+ invalidationResultSetTest (
369+ setupCacheEntryTestTuple , ImmutableSet .of ("test_type_caching_2" ));
365370 });
366371 }
367372
@@ -370,26 +375,29 @@ public void should_invalidate_cache_entry_on_tuple_udt_change_variable_defs() {
370375 SchemaChangeSynchronizer .withLock (
371376 () -> {
372377 invalidationVariableDefsTest (
373- setupCacheEntryTestTuple , false , ImmutableSet .of ("test_type_2 " ));
378+ setupCacheEntryTestTuple , false , ImmutableSet .of ("test_type_caching_2 " ));
374379 });
375380 }
376381
377382 Consumer <CqlSession > setupCacheEntryTestNested =
378383 (session ) -> {
379- session .execute ("CREATE TYPE test_type_1 (a text, b int)" );
380- session .execute ("CREATE TYPE test_type_2 (c int, d text)" );
381- session .execute ("CREATE TYPE test_type_3 (e frozen<test_type_1>, f int)" );
382- session .execute ("CREATE TYPE test_type_4 (g int, h frozen<test_type_2>)" );
383- session .execute ("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_3>)" );
384- session .execute ("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_4>)" );
384+ session .execute ("CREATE TYPE test_type_caching_1 (a text, b int)" );
385+ session .execute ("CREATE TYPE test_type_caching_2 (c int, d text)" );
386+ session .execute ("CREATE TYPE test_type_caching_3 (e frozen<test_type_caching_1>, f int)" );
387+ session .execute ("CREATE TYPE test_type_caching_4 (g int, h frozen<test_type_caching_2>)" );
388+ session .execute (
389+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_3>)" );
390+ session .execute (
391+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_4>)" );
385392 };
386393
387394 @ Test
388395 public void should_invalidate_cache_entry_on_nested_udt_change_result_set () {
389396 SchemaChangeSynchronizer .withLock (
390397 () -> {
391398 invalidationResultSetTest (
392- setupCacheEntryTestNested , ImmutableSet .of ("test_type_2" , "test_type_4" ));
399+ setupCacheEntryTestNested ,
400+ ImmutableSet .of ("test_type_caching_2" , "test_type_caching_4" ));
393401 });
394402 }
395403
@@ -398,7 +406,9 @@ public void should_invalidate_cache_entry_on_nested_udt_change_variable_defs() {
398406 SchemaChangeSynchronizer .withLock (
399407 () -> {
400408 invalidationVariableDefsTest (
401- setupCacheEntryTestNested , false , ImmutableSet .of ("test_type_2" , "test_type_4" ));
409+ setupCacheEntryTestNested ,
410+ false ,
411+ ImmutableSet .of ("test_type_caching_2" , "test_type_caching_4" ));
402412 });
403413 }
404414
0 commit comments