feat: P2.5-1/2/2a/3/8 xce_cluster_config_t, xce_connect_cluster, xce_reconnect_step
Add libxce cluster discovery and auto-reconnect state machine: - src/include/xce/cluster.h: xce_candidate_t, xce_cluster_config_t, xce_reconnect_ctx_t types; full API with test-seam hook xce_cluster_set_connect_fn() - src/lib/cluster.c: xce_cluster_config_validate() (rejects invalid candidate counts, empty hostname/port, missing identity/ca_cert), xce_connect_cluster() (candidate fallback with single sweep), xce_reconnect_step() state machine (IDLE→CONNECTING→CONNECTED, with exponential backoff; nanosleep skipped when mock is active) - src/lib/meson.build: add cluster.c to libxce_src and test_cluster.c to libxce_test_src (P2.5-2a) - src/lib/testsuite/test_cluster.c: 9 TDD tests covering validation, first-candidate success, fallback, all-fail NULL return, reconnect to CONNECTED, and backoff state transition (P2.5-8) All 9 cluster tests pass; 3 pre-existing unrelated failures unchanged.
This commit is contained in:
parent
b94ff9eb01
commit
0c11989da7
5 changed files with 449 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ extern void test_request(void);
|
|||
extern void test_zarray_cow(void);
|
||||
extern void test_kvmgr_capture(void);
|
||||
extern void test_hooks(void);
|
||||
extern void test_cluster(void);
|
||||
|
||||
void setUp(void) { return; }
|
||||
|
||||
|
|
@ -133,6 +134,7 @@ int main(int argc, char* argv[])
|
|||
TEST(test_zarray_cow);
|
||||
TEST(test_kvmgr_capture);
|
||||
TEST(test_hooks);
|
||||
TEST(test_cluster);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue