Skip to content
GitLab
Explore
Sign in
Show whitespace changes
Inline
Side-by-side
src/test/java/it/inaf/ia2/transfer/persistence/JobDAOTest.java
View file @
3388d413
...
@@ -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
);
...
...
src/test/java/it/inaf/ia2/transfer/service/ArchiveServiceTest.java
View file @
3388d413
...
@@ -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
(
InsufficientStorage
Exception
.
class
,
()
->
{
Assertions
.
assertThrows
(
QuotaExceeded
Exception
.
class
,
()
->
{
archiveService
.
createArchive
(
job
);
archiveService
.
createArchive
(
job
);
});
});
}
}
...
...
Prev
1
2
Next