OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-cog commits / 4faa8dc

Fix so that we test the range.
4faa8dc94c0a0826fb4e3e898d5fca93ceb25e07
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-08T06:26:39.000Z

Changed files (1) +8 -3

tests/persist/cog-storage/MultiDeleteUTest.cxxtest +8 -3
……@@ -209,12 +209,17 @@ void MultiDeleteUTest::test_add_delete(void)
209209
210210 // Size should be 19: the 18 from before plus that annoying
211211 // (Predicate "*-TruthValueKey-*")
212 size_t expected_size = 3 + 6 + n_threads;
213 if (as->get_size() != expected_size)
212 // Well, actually, there is no guarantee that the removes will
213 // happen after the stores. Best we can do is check lower and
214 // upper bounds of 18 and 34:
215 size_t min_size = 3 + n_threads + 6;
216 size_t max_size = 3 + 2*(n_threads + 6);
217 if (as->get_size() < min_size or max_size < as->get_size())
214218 printf("Error: Bad size! AtomSpace contents =\n%s\n",
215219 as->to_string().c_str());
216220
217 TS_ASSERT_EQUALS(as->get_size(), expected_size);
221 TS_ASSERT(as->get_size() >= min_size);
222 TS_ASSERT(as->get_size() <= max_size);
218223
219224 store->erase();
220225 store->close();