Search in sources :

Example 1 with ResilientFileTask

use of org.dcache.resilience.util.ResilientFileTask in project dcache by dCache.

the class FileOperationHandlerTest method whenTaskIsCreatedAndCalled.

private void whenTaskIsCreatedAndCalled() {
    task = new ResilientFileTask(update.pnfsId, 0, fileOperationHandler);
    task.call();
}
Also used : ResilientFileTask(org.dcache.resilience.util.ResilientFileTask)

Example 2 with ResilientFileTask

use of org.dcache.resilience.util.ResilientFileTask in project dcache by dCache.

the class FileOperationHandlerTest method whenOperationFailsWithSourceError.

private void whenOperationFailsWithSourceError() throws IOException {
    fileOperationMap.scan();
    fileOperationMap.updateOperation(update.pnfsId, new CacheException(CacheException.FILE_NOT_IN_REPOSITORY, "Source pool failed"));
    ResilientFileTask task = new ResilientFileTask(update.pnfsId, 0, fileOperationHandler);
    task.setType(Type.COPY);
    fileOperationMap.getOperation(update.pnfsId).setTask(task);
    fileOperationMap.scan();
}
Also used : CacheException(diskCacheV111.util.CacheException) ResilientFileTask(org.dcache.resilience.util.ResilientFileTask)

Aggregations

ResilientFileTask (org.dcache.resilience.util.ResilientFileTask)2 CacheException (diskCacheV111.util.CacheException)1