1717
1818import com .google .common .collect .Lists ;
1919import com .spectralogic .ds3client .Ds3Client ;
20- import com .spectralogic .ds3client .commands .*;
20+ import com .spectralogic .ds3client .commands .PutObjectRequest ;
21+ import com .spectralogic .ds3client .commands .PutObjectResponse ;
2122import com .spectralogic .ds3client .commands .spectrads3 .*;
2223import com .spectralogic .ds3client .commands .spectrads3 .notifications .GetObjectCachedNotificationRegistrationSpectraS3Request ;
2324import com .spectralogic .ds3client .commands .spectrads3 .notifications .GetObjectCachedNotificationRegistrationSpectraS3Response ;
3132import com .spectralogic .ds3client .models .bulk .Ds3Object ;
3233import com .spectralogic .ds3client .serializer .XmlProcessingException ;
3334import com .spectralogic .ds3client .utils .ResourceUtils ;
34- import static org .hamcrest .Matchers .*;
3535import org .junit .AfterClass ;
3636import org .junit .Before ;
3737import org .junit .BeforeClass ;
4040import java .io .IOException ;
4141import java .net .URISyntaxException ;
4242import java .nio .channels .SeekableByteChannel ;
43- import java .nio .file .*;
43+ import java .nio .file .Files ;
44+ import java .nio .file .Path ;
4445import java .security .SignatureException ;
4546import java .util .ArrayList ;
4647import java .util .Date ;
4748import java .util .List ;
4849import java .util .UUID ;
4950
50- import static com .spectralogic .ds3client .integration .Util .*;
51+ import static com .spectralogic .ds3client .integration .Util .RESOURCE_BASE_NAME ;
52+ import static com .spectralogic .ds3client .integration .Util .deleteAllContents ;
53+ import static org .hamcrest .Matchers .*;
5154import static org .junit .Assert .*;
5255
5356public class PutJobManagement_Test {
@@ -61,7 +64,7 @@ public class PutJobManagement_Test {
6164
6265 @ BeforeClass
6366 public static void startup () throws IOException , SignatureException {
64- final UUID dataPolicyId = TempStorageUtil .setupDataPolicy (TEST_ENV_NAME , true , ChecksumType .Type .MD5 , client );
67+ final UUID dataPolicyId = TempStorageUtil .setupDataPolicy (TEST_ENV_NAME , false , ChecksumType .Type .MD5 , client );
6568 envStorageIds = TempStorageUtil .setup (TEST_ENV_NAME , dataPolicyId , client );
6669 }
6770
@@ -158,7 +161,7 @@ public void modifyJobPriority() throws IOException, SignatureException, XmlProce
158161
159162 @ Test
160163 public void modifyJobName () throws IOException , SignatureException , XmlProcessingException {
161-
164+
162165 try {
163166 final Ds3ClientHelpers .Job job =
164167 HELPERS .startWriteJob (BUCKET_NAME , Lists .newArrayList (new Ds3Object ("testOne" , 2 )));
@@ -178,7 +181,7 @@ public void modifyJobName() throws IOException, SignatureException, XmlProcessin
178181
179182 @ Test
180183 public void modifyJobCreationDate () throws IOException , SignatureException , XmlProcessingException {
181-
184+
182185 try {
183186 final Ds3ClientHelpers .Job job =
184187 HELPERS .startWriteJob (BUCKET_NAME , Lists .newArrayList (new Ds3Object ("testOne" , 2 )));
@@ -203,7 +206,7 @@ public void modifyJobCreationDate() throws IOException, SignatureException, XmlP
203206
204207 @ Test
205208 public void cancelJob () throws IOException , SignatureException , XmlProcessingException {
206-
209+
207210 try {
208211 final Ds3ClientHelpers .Job job =
209212 HELPERS .startWriteJob (BUCKET_NAME , Lists .newArrayList (new Ds3Object ("testOne" , 2 )));
@@ -272,7 +275,7 @@ public void truncateJobCancelWithOutForce() throws IOException, SignatureExcepti
272275 public void cancelJobWithForce () throws IOException , SignatureException , XmlProcessingException , URISyntaxException , InterruptedException {
273276
274277 final int testTimeOutSeconds = 5 ;
275-
278+
276279 final String book1 = "beowulf.txt" ;
277280 final Path objPath1 = ResourceUtils .loadFileResource (RESOURCE_BASE_NAME + book1 );
278281 final Ds3Object obj1 = new Ds3Object (book1 , Files .size (objPath1 ));
@@ -310,7 +313,7 @@ public void cancelJobWithForce() throws IOException, SignatureException, XmlProc
310313
311314 @ Test
312315 public void cancelAllJobs () throws IOException , SignatureException , XmlProcessingException {
313-
316+
314317 try {
315318 HELPERS .startWriteJob (BUCKET_NAME , Lists .newArrayList (new Ds3Object ("testOne" , 2 )));
316319 final List <Ds3Object > objectsTwo = Lists .newArrayList (new Ds3Object ("testTwo" , 2 ));
@@ -419,7 +422,7 @@ public void cancelAllJobsWithForce ()throws IOException, SignatureException, Xml
419422
420423 @ Test
421424 public void getCanceledJobs () throws IOException , SignatureException , XmlProcessingException {
422-
425+
423426 try {
424427 final Ds3ClientHelpers .Job jobOne =
425428 HELPERS .startWriteJob (BUCKET_NAME , Lists .newArrayList (new Ds3Object ("test" , 2 )));
@@ -443,7 +446,7 @@ public void getCanceledJobs() throws IOException, SignatureException, XmlProcess
443446
444447 @ Test
445448 public void getJobChunksReady () throws IOException , SignatureException , XmlProcessingException {
446-
449+
447450 try {
448451 final Ds3Object ds3Object = new Ds3Object ("test" , 2 );
449452 final Ds3ClientHelpers .Job jobOne =
@@ -470,7 +473,7 @@ public void getJobChunksReady() throws IOException, SignatureException, XmlProce
470473
471474 @ Test
472475 public void aggregateTwoJobs () throws IOException , SignatureException , XmlProcessingException {
473-
476+
474477 try {
475478 final WriteJobOptions writeJobOptions = WriteJobOptions .create ().withAggregating ();
476479
@@ -491,7 +494,7 @@ public void aggregateTwoJobs() throws IOException, SignatureException, XmlProces
491494
492495 @ Test
493496 public void allocateJobChunk () throws IOException , SignatureException , XmlProcessingException {
494-
497+
495498 try {
496499 final PutBulkJobSpectraS3Response putBulkResponse = client .
497500 putBulkJobSpectraS3 (new PutBulkJobSpectraS3Request (BUCKET_NAME , Lists .newArrayList (new Ds3Object ("test" , 2 ))));
0 commit comments