diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-01-17 18:22:00 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-01-17 18:22:00 -0500 |
| commit | 138c793b0a58577713d98c98bb140cf1d9c79bee (patch) | |
| tree | 921197e2ba521704cb379ac8069189e70f8dee3d /tests/de_tier_concurrent.cpp | |
| parent | 2117935e85412f3733ee0bcb1830c7fd0b129b29 (diff) | |
| download | dynamic-extension-138c793b0a58577713d98c98bb140cf1d9c79bee.tar.gz | |
Multiple concurrency bug fixes
A poorly organized commit with fixes for a variety of bugs that were
causing missing records. The core problems all appear to be fixed,
though there is an outstanding problem with tombstones not being
completely canceled. A very small number are appearing in the wrong
order during the static structure test.
Diffstat (limited to 'tests/de_tier_concurrent.cpp')
| -rw-r--r-- | tests/de_tier_concurrent.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/de_tier_concurrent.cpp b/tests/de_tier_concurrent.cpp new file mode 100644 index 0000000..9387b21 --- /dev/null +++ b/tests/de_tier_concurrent.cpp @@ -0,0 +1,57 @@ +/* + * tests/de_level_tomb.cpp + * + * Unit tests for Dynamic Extension Framework + * + * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Dong Xie <dongx@psu.edu> + * + * Distributed under the Modified BSD License. + * + */ +#include <set> +#include <random> +#include <algorithm> + +#include "include/testing.h" +#include "framework/DynamicExtension.h" +#include "shard/ISAMTree.h" +#include "query/rangequery.h" + +#include <check.h> +using namespace de; + +typedef DynamicExtension<Rec, ISAMTree<Rec>, rq::Query<ISAMTree<Rec>, Rec>, LayoutPolicy::TEIRING, DeletePolicy::TOMBSTONE, FIFOScheduler> DE; + +#include "include/concurrent_extension.h" + + +Suite *unit_testing() +{ + Suite *unit = suite_create("DynamicExtension: Tombstone Leveling Testing"); + inject_dynamic_extension_tests(unit); + + return unit; +} + + +int shard_unit_tests() +{ + int failed = 0; + Suite *unit = unit_testing(); + SRunner *unit_shardner = srunner_create(unit); + + srunner_run_all(unit_shardner, CK_NORMAL); + failed = srunner_ntests_failed(unit_shardner); + srunner_free(unit_shardner); + + return failed; +} + + +int main() +{ + int unit_failed = shard_unit_tests(); + + return (unit_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} |