| … | … | @@ -209,14 +209,22 @@ void SimpleMultiDeleteUTest::test_add_delete(void) |
| 209 | 209 | store->load_atomspace(); |
| 210 | 210 | printf("Final AtomSpace size=%lu\n", as->get_size()); |
| 211 | 211 | |
| 212 | #if THIS_IS_NOT_TRUE |
| 212 | 213 | // Size should be 19: the 18 from before plus that annoying |
| 213 | 214 | // (Predicate "*-TruthValueKey-*") |
| 215 | // |
| 216 | // Well, but this will not hold true, because the insert and |
| 217 | // remove ran in different threads, asynchronously, and so |
| 218 | // there may have been inserts after the "matching" remove. |
| 219 | // This is rare for this test (about one out of 30 runs) |
| 220 | // but happens a log for regular MultiDeleteUTest. |
| 214 | 221 | size_t expected_size = 9 + n_threads; |
| 215 | 222 | if (as->get_size() != expected_size) |
| 216 | 223 | printf("Error: Bad size! AtomSpace contents =\n%s\n", |
| 217 | 224 | as->to_string().c_str()); |
| 218 | 225 | |
| 219 | 226 | TS_ASSERT_EQUALS(as->get_size(), expected_size); |
| 227 | #endif |
| 220 | 228 | |
| 221 | 229 | store->erase(); |
| 222 | 230 | store->close(); |