Search code examples
testing.net-coreintegration-testingclickhouse

How to do integration tests for code that uses ClickHouse dictionaries?


There is backend code in .Net Core. Integration tests need to be written. But, this code performs queries to the ClickHouse dictionary. A dictionary is created from other dictionaries, and other dictionaries are also created from dictionaries.

Currently, after entering test data and before executing the query, I set a pause equal to the sum of LIFETIME of all dictionaries. But I think that this is not the optimal approach, because... The execution time of test cases increases greatly.

Are there any ideas on how this can be tested so as not to use a pause equal to the sum of LIFETIME of all dictionaries?


Solution

  • run system reload dictionaries?

    https://clickhouse.com/docs/en/sql-reference/statements/system#reload-dictionaries