Skip to content
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
*/ */
package it.inaf.ia2.transfer.persistence; package it.inaf.ia2.transfer.persistence;
import it.inaf.ia2.transfer.exception.JobException; import it.inaf.oats.vospace.exception.InternalFaultException;
import it.inaf.ia2.transfer.exception.JobException.Type;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
...@@ -52,8 +51,7 @@ public class JobDAOTest { ...@@ -52,8 +51,7 @@ public class JobDAOTest {
assertEquals(ExecutionPhase.QUEUED, dao.getJobPhase("pippo3")); assertEquals(ExecutionPhase.QUEUED, dao.getJobPhase("pippo3"));
JobException jobError = new JobException(Type.FATAL, "Error message") InternalFaultException jobError = new InternalFaultException("Error detail");
.setErrorDetail("Error detail");
dao.setJobError("pippo3", jobError); dao.setJobError("pippo3", jobError);
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
package it.inaf.ia2.transfer.service; package it.inaf.ia2.transfer.service;
import it.inaf.ia2.transfer.auth.TokenPrincipal; import it.inaf.ia2.transfer.auth.TokenPrincipal;
import it.inaf.ia2.transfer.exception.InsufficientStorageException;
import it.inaf.ia2.transfer.persistence.FileDAO; import it.inaf.ia2.transfer.persistence.FileDAO;
import it.inaf.ia2.transfer.persistence.JobDAO; import it.inaf.ia2.transfer.persistence.JobDAO;
import it.inaf.ia2.transfer.persistence.LocationDAO; import it.inaf.ia2.transfer.persistence.LocationDAO;
import it.inaf.ia2.transfer.persistence.model.FileInfo; import it.inaf.ia2.transfer.persistence.model.FileInfo;
import it.inaf.oats.vospace.exception.QuotaExceededException;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
...@@ -151,7 +151,7 @@ public class ArchiveServiceTest { ...@@ -151,7 +151,7 @@ public class ArchiveServiceTest {
fos.write(junk); fos.write(junk);
} }
Assertions.assertThrows(InsufficientStorageException.class, () -> { Assertions.assertThrows(QuotaExceededException.class, () -> {
archiveService.createArchive(job); archiveService.createArchive(job);
}); });
} }
......