This commit is contained in:
jamesagnew 2021-05-11 09:26:23 -04:00
parent 5c4fcac530
commit e9ff2fd3ae
1 changed files with 15 additions and 1 deletions

View File

@ -36,6 +36,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -146,7 +148,19 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
}
runInTransaction(()->{
assertEquals(60, myResourceTableDao.count());
Map<String, Integer> counts = new TreeMap<>();
myResourceTableDao
.findAll()
.stream()
.forEach(t->{
counts.putIfAbsent(t.getResourceType(), 0);
int value = counts.get(t.getResourceType());
value++;
counts.put(t.getResourceType(), value);
});
ourLog.info("Counts: {}", counts);
assertEquals(60, myResourceTableDao.count(), counts.toString());
});
}