summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-05-16 14:33:34 +0200
committerTor Egge <Tor.Egge@online.no>2022-05-16 14:33:34 +0200
commit507224c56ed2915d69443e522f1438c8efe9e67b (patch)
treee72e8f64e4f8fd73824fdba80ad4893fc5bbc68d
parente4e4740cd2c4d12feef9776e71de5a86de95bda0 (diff)
Remove disabled unit test that triggered compiler warnings
(gcc 12 on aarch64 platform).
-rw-r--r--storage/src/tests/persistence/splitbitdetectortest.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/storage/src/tests/persistence/splitbitdetectortest.cpp b/storage/src/tests/persistence/splitbitdetectortest.cpp
index 86575c75b60..b93783f5cdf 100644
--- a/storage/src/tests/persistence/splitbitdetectortest.cpp
+++ b/storage/src/tests/persistence/splitbitdetectortest.cpp
@@ -162,46 +162,4 @@ TEST_F(SplitBitDetectorTest, zero_doc_limit_falls_back_to_one_bit_increase_on_gi
result.toString());
}
-/**
- * Not a regular unit test in itself, but more of an utility to find non-unique
- * document IDs that map to the same 58-bit bucket ID. Disabled by default since
- * it costs CPU to do this and is not necessary during normal testing.
- */
-TEST_F(SplitBitDetectorTest, DISABLED_find_bucket_collision_ids) {
- using document::DocumentId;
- using document::BucketId;
-
- document::BucketIdFactory factory;
-
- DocumentId targetId("id:foo:music:n=123456:ABCDEFGHIJKLMN");
- BucketId targetBucket(factory.getBucketId(targetId));
- char candidateSuffix[] = "ABCDEFGHIJKLMN";
-
- size_t iterations = 0;
- constexpr size_t maxIterations = 100000000;
- while (std::next_permutation(std::begin(candidateSuffix), std::end(candidateSuffix) - 1))
- {
- ++iterations;
-
- DocumentId candidateId(vespalib::make_string("id:foo:music:n=123456:%s",candidateSuffix));
- BucketId candidateBucket(factory.getBucketId(candidateId));
- if (targetBucket == candidateBucket) {
- std::cerr << "\nFound a collision after " << iterations
- << " iterations!\n"
- << "target: " << targetId << " -> " << targetBucket
- << "\ncollision: " << candidateId << " -> "
- << candidateBucket << "\n";
- return;
- }
-
- if (iterations == maxIterations) {
- std::cerr << "\nNo collision found after " << iterations
- << " iterations :[\n";
- return;
- }
- }
- std::cerr << "\nRan out of permutations after " << iterations
- << " iterations!\n";
-}
-
}