![]() |
FOSSology
4.7.1
Open Source License Compliance by Open Source Software
|
Nested-set parity and per-node heartbeat regression tests. More...
#include <libfossology.h>#include <libfocunit.h>#include <sys/resource.h>#include "../../agent/adj2nest.c"
Go to the source code of this file.
Classes | |
| struct | nested_set |
Macros | |
| #define | main adj2nest_main |
| #define | PQexec capture_update |
| #define | PQclear capture_clear |
| #define | fo_scheduler_heart capture_heart |
Functions | |
| static PGresult * | capture_update (PGconn *connection, const char *query) |
| static void | capture_clear (PGresult *result) |
| static void | capture_heart (int items) |
| static void | set_up (void) |
| static void | tear_down (void) |
| static void | make_tree (long count) |
| static int | compare_pk (const void *a, const void *b) |
| static const nested_set * | find_row (long index) |
| static void | assert_range (long index, long lft, long rgt) |
| static void | run_walk (void) |
| static void | walk_recursive (long index, long *number) |
| static void | assert_recursive_parity (void) |
| static void | test_single_node (void) |
| static void | test_siblings (void) |
| static void | test_mixed_tree (void) |
| static void | test_deep_tree (void) |
| static void | test_generated_tree (void) |
| static void | test_wide_tree (void) |
| int | main (int argc, char **argv) |
Variables | |
| volatile gint | items_processed |
| The number of items processed by the agent. | |
| volatile int | alive |
| If the agent has updated with a hearbeat. | |
| static nested_set * | actual |
| static nested_set * | expected |
| static unsigned char * | endpoints |
| static PGresult * | command_result |
| static long | update_count |
| static long | clear_count |
| static long | heart_count |
| static long | expected_count |
| static struct rlimit | saved_stack_limit |
| static int | stack_limited |
| static CU_TestInfo | walk_tree_tests [] |
| static CU_SuiteInfo | suites [] |
Nested-set parity and per-node heartbeat regression tests.
Exercise the production traversal without a database or scheduler process. Database updates are captured as (uploadtree_pk, lft, rgt) tuples; heartbeat calls are checked and forwarded to the real scheduler library. This tests progress/aliveness updates, not wall-clock heartbeat delivery or DB latency.
Definition in file test_walk_tree.c.
|
static |
Frozen numbering logic from WalkTree before commit 1766d5b1c17. Both children and siblings recurse. Keep independent of the production SetNum and DB mocks; never use this oracle on the stack-overflow fixture.
Definition at line 221 of file test_walk_tree.c.
|
static |
Definition at line 369 of file test_walk_tree.c.
|
static |
Definition at line 359 of file test_walk_tree.c.