MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / validate

Function validate

test/cloudtest/test_storage_shared_fate.py:95–120  ·  view source on GitHub ↗
(mz: MaterializeApplication, seed: int)

Source from the content-addressed store, hash-verified

93
94
95def validate(mz: MaterializeApplication, seed: int) -> None:
96 validations = "\n".join(f"""
97 > INSERT INTO t{i} SELECT 234000 + generate_series FROM generate_series(1, 1000);
98
99 > SELECT COUNT(*) FROM source{i}_tbl;
100 3000
101
102 > SELECT * FROM v{i};
103 3000
104
105 > SELECT COUNT(*) FROM sink{i}_check_tbl;
106 2000
107 """ for i in range(NUM_SOURCES))
108
109 mz.testdrive.run(
110 input=dedent(f"""
111 $ kafka-ingest key-format=bytes format=bytes key-terminator=: topic=storage-shared-fate repeat=1000
112 EFG${{kafka-ingest.iteration}}:EFG${{kafka-ingest.iteration}}
113
114 {validations}
115
116 > DROP CLUSTER storage_shared_fate CASCADE;
117 """),
118 no_reset=True,
119 seed=seed,
120 )
121
122
123def kill_clusterd(

Calls 2

joinMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected