More test logging
This commit is contained in:
parent
ba8f50f0c8
commit
5f4355017d
|
@ -932,7 +932,10 @@ public class SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc {
|
||||||
|
|
||||||
private void doSaveSearch() {
|
private void doSaveSearch() {
|
||||||
|
|
||||||
Search newSearch = mySearchCacheSvc.save(mySearch);
|
// This is an attempt to track down an intermittent test
|
||||||
|
// failure in testAsyncSearchLargeResultSetBigCountSameCoordinator
|
||||||
|
Object searchObj = mySearchCacheSvc.save(mySearch);
|
||||||
|
Search newSearch = (Search) searchObj;
|
||||||
|
|
||||||
// mySearchDao.save is not supposed to return null, but in unit tests
|
// mySearchDao.save is not supposed to return null, but in unit tests
|
||||||
// it can if the mock search dao isn't set up to handle that
|
// it can if the mock search dao isn't set up to handle that
|
||||||
|
|
|
@ -349,7 +349,10 @@ public class SearchCoordinatorSvcImplTest {
|
||||||
List<ResourcePersistentId> pids = createPidSequence(800);
|
List<ResourcePersistentId> pids = createPidSequence(800);
|
||||||
IResultIterator iter = new SlowIterator(pids.iterator(), 2);
|
IResultIterator iter = new SlowIterator(pids.iterator(), 2);
|
||||||
when(mySearchBuilder.createQuery(same(params), any(), any())).thenReturn(iter);
|
when(mySearchBuilder.createQuery(same(params), any(), any())).thenReturn(iter);
|
||||||
when(mySearchCacheSvc.save(any())).thenAnswer(t -> t.getArguments()[0]);
|
when(mySearchCacheSvc.save(any())).thenAnswer(t ->{
|
||||||
|
ourLog.info("Saving search");
|
||||||
|
return t.getArgument( 0, Search.class);
|
||||||
|
});
|
||||||
doAnswer(loadPids()).when(mySearchBuilder).loadResourcesByPid(any(Collection.class), any(Collection.class), any(List.class), anyBoolean(), any());
|
doAnswer(loadPids()).when(mySearchBuilder).loadResourcesByPid(any(Collection.class), any(Collection.class), any(List.class), anyBoolean(), any());
|
||||||
|
|
||||||
IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null);
|
IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null);
|
||||||
|
|
Loading…
Reference in New Issue