OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-rocks commits / 08f98bc

Revive MultiDeleteUTes
08f98bc8004ab120be84b78855f9819800217883
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-08T06:37:59.000Z

Changed files (1) +8 -3

tests/persist/rocks/MultiDeleteUTest.cxxtest +8 -3
……@@ -197,12 +197,17 @@ void MultiDeleteUTest::test_add_delete(void)
197197
198198 // Size should be 19: the 18 from before plus that annoying
199199 // (Predicate "*-TruthValueKey-*")
200 size_t expected_size = 3 + n_threads + 6;
201 if (as->get_size() != expected_size)
200 // Well, actually, there is no guarantee that the removes will
201 // happen after the stores. Best we can do is check lower and
202 // upper bounds of 18 and 34:
203 size_t min_size = 3 + n_threads + 6;
204 size_t max_size = 3 + 2*(n_threads + 6);
205 if (as->get_size() < min_size or max_size < as->get_size())
202206 printf("Error: Bad size! AtomSpace contents =\n%s\n",
203207 as->to_string().c_str());
204208
205 TS_ASSERT_EQUALS(as->get_size(), expected_size);
209 TS_ASSERT(as->get_size() >= min_size);
210 TS_ASSERT(as->get_size() <= max_size);
206211
207212 store->erase();
208213 store->close();