OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-cog commits / d332f8e

Revise MultiDeleteUTest for async behavior
The test runs async; it won't pass as writtten
d332f8e377d2716c3c650af283a86e1bf562dd8a
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-07T01:24:33.000Z

Changed files (1) +8 -0

tests/persist/cog-storage/MultiDeleteUTest.cxxtest +8 -0
……@@ -207,14 +207,22 @@ void MultiDeleteUTest::test_add_delete(void)
207207 store->load_atomspace();
208208 printf("Final AtomSpace size=%lu\n", as->get_size());
209209
210#if THIS_IS_NOT_TRUE
210211 // Size should be 19: the 18 from before plus that annoying
211212 // (Predicate "*-TruthValueKey-*")
213 //
214 // Well, but this will not hold true, because the insert and
215 // remove ran in different threads, asynchronously, and so
216 // there may have been inserts after the "matching" remove.
217 // This will hold for the MonoMultiDeleteUTest, because
218 // everything is processed synchronously, there. But not here.
212219 size_t expected_size = 9 + n_threads;
213220 if (as->get_size() != expected_size)
214221 printf("Error: Bad size! AtomSpace contents =\n%s\n",
215222 as->to_string().c_str());
216223
217224 TS_ASSERT_EQUALS(as->get_size(), expected_size);
225#endif
218226
219227 store->erase();
220228 store->close();