Skip to content

Commit 660a01f

Browse files
refactor(grpc): use public solve_lp/mip_remote in integration tests
Replace the internal grpc_client_t (and the interim grpc_cpp_client_t wrapper) with the already-public solve_lp_remote() / solve_mip_remote() API in GRPC_INTEGRATION_TEST. Each fixture sets CUOPT_REMOTE_HOST / CUOPT_REMOTE_PORT via setenv() so the public functions can reach the per-test server without any internal client class. Changes: - Delete grpc_cpp_client_t (grpc_cpp_client.hpp, grpc_client_types.hpp, grpc_cpp_client.cpp) — unnecessary abstraction - Revert grpc_client.hpp and grpc_client_env.hpp to their pre-PR state - Remove src/grpc/client from GRPC_INTEGRATION_TEST include paths - Rewrite grpc_integration_test.cpp to use only the public API: • ServerProcess::wait_for_ready uses raw gRPC channel connectivity • GrpcIntegrationTestBase sets/clears env vars in SetUp/TearDown • TLS / mTLS tests use CUOPT_TLS_* env vars (cert file paths) • ChunkedUploadTests sets CUOPT_MAX_MESSAGE_BYTES=4096 to trigger the chunked transport path for medium-sized problems • QCQP end-to-end tests kept (functional value independent of path) • ChunkValidationTests kept unchanged (raw gRPC stub) - Remove tests that require the internal async lifecycle API: submit_lp/mip, check_status, cancel_job, delete_job, stream_logs, get_result, debug_log_callback, log_callback, incumbent_callback This eliminates any static-library linkage risk and makes the test binary depend only on the public cuopt shared library. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cd8ddad commit 660a01f

2 files changed

Lines changed: 220 additions & 1170 deletions

File tree

cpp/tests/linear_programming/grpc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ target_include_directories(GRPC_INTEGRATION_TEST
9999
PRIVATE
100100
"${CUOPT_SOURCE_DIR}/include"
101101
"${CUOPT_SOURCE_DIR}/src/grpc"
102-
"${CUOPT_SOURCE_DIR}/src/grpc/client"
103102
"${CUOPT_TEST_DIR}"
104103
"${CMAKE_BINARY_DIR}" # For generated protobuf headers
105104
)

0 commit comments

Comments
 (0)