#  Copyright (C) GridGain Systems. All Rights Reserved.
#  _________        _____ __________________        _____
#  __  ____/___________(_)______  /__  ____/______ ____(_)_______
#  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
#  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
#  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/

set(TARGET gridgain-client-test)

set(SOURCES
    basic_authenticator_test.cpp
    column_order_test.cpp
    compute_test.cpp
    compute_observable_ts_integration_test.cpp
    continuous_query_test.cpp
    ignite_client_test.cpp
    ignite_error_trace_listener_test.cpp
    key_value_binary_view_test.cpp
    key_value_view_test.cpp
    main.cpp
    record_binary_view_test.cpp
    record_view_test.cpp
    schema_synchronization_test.cpp
    sql_test.cpp
    ssl_test.cpp
    tables_test.cpp
    transactions_test.cpp
    partition_awareness_test.cpp
    message_retry_test.cpp
)

ignite_test(${TARGET} SOURCES ${SOURCES} LIBS gridgain-test-common gridgain9-client-static)

# Tests needing an all-plain cluster - every node reachable over plaintext - live in a separate binary,
# kept out of the common client-test run. The default platform-test cluster exposes a plaintext client
# port on only two of its four nodes: enough for the suites above, but not for anything that has to reach
# every partition owner (direct transaction mapping) or spread a workload over the whole cluster (the
# long-running data-consistency stress tests). CI runs the wait-die and wound-wait variants on separate
# agents against separate clusters (see modules/platforms/build.gradle).
set(DATA_CONSISTENCY_TARGET gridgain-client-data-consistency-test)

set(DATA_CONSISTENCY_SOURCES
    data_consistency_main.cpp
    data_consistency_test.cpp
    direct_tx_cluster_test.cpp
)

ignite_test(${DATA_CONSISTENCY_TARGET} SOURCES ${DATA_CONSISTENCY_SOURCES}
    LIBS gridgain-test-common gridgain9-client-static)
