Package org.jclouds.io.internal

Examples of org.jclouds.io.internal.BasePayloadSlicer$PayloadIterator


@Test(groups = {"unit"})
public class BaseSlicingStrategyTest {
   @Test
   public void slicing100MBTest() {
      BaseSlicingStrategy slicer = new BaseSlicingStrategy(new BasePayloadSlicer());
      slicer.startSlicing(buildPayload(100 * MiB));

      long offset = 0;
      while (slicer.hasNext()) {
         PayloadSlice slice = slicer.nextSlice();
View Full Code Here


      }
   }

   @Test
   public void slicing2000MBTest() {
      BaseSlicingStrategy slicer = new BaseSlicingStrategy(new BasePayloadSlicer());
      slicer.startSlicing(buildPayload(2000 * MiB));

      long offset = 0;
      while (slicer.hasNext()) {
         PayloadSlice slice = slicer.nextSlice();
View Full Code Here

      }
   }

   @Test
   public void slicing2MBTest() {
      BaseSlicingStrategy slicer = new BaseSlicingStrategy(new BasePayloadSlicer());
      slicer.startSlicing(buildPayload(2 * MiB));

      long offset = 0;
      while (slicer.hasNext()) {
         PayloadSlice slice = slicer.nextSlice();
View Full Code Here

      }
   }

   @Test
   public void slicing40000GBTest() {
      BaseSlicingStrategy slicer = new BaseSlicingStrategy(new BasePayloadSlicer());
      slicer.startSlicing(buildPayload(40000 * GiB));

      long offset = 0;
      while (slicer.hasNext()) {
         PayloadSlice slice = slicer.nextSlice();
View Full Code Here

      }
      server.enqueue(new MockResponse().setResponseCode(204).addHeader(TREE_HASH, hash4));
      server.enqueue(new MockResponse().setResponseCode(201).addHeader(ARCHIVE_ID, "archive-id"));

      SequentialMultipartUploadStrategy strat = new SequentialMultipartUploadStrategy(client,
            new BaseSlicingStrategy(new BasePayloadSlicer()));

      assertThat(strat.execute("vault", new BlobBuilderImpl().name("test").payload(buildPayload(100 * MiB)).build()))
            .isEqualTo("archive-id");

      RecordedRequest initiate = server.takeRequest();
View Full Code Here

      server.enqueue(new MockResponse().setResponseCode(204).addHeader(TREE_HASH, hash8));
      server.enqueue(new MockResponse().setResponseCode(404));
      server.enqueue(new MockResponse().setResponseCode(204));

      SequentialMultipartUploadStrategy strat = new SequentialMultipartUploadStrategy(client,
            new BaseSlicingStrategy(new BasePayloadSlicer()));

      try {
         strat.execute("vault", new BlobBuilderImpl().name("test").payload(buildPayload(100 * MiB)).build());
      } finally {
         server.takeRequest();
View Full Code Here

TOP

Related Classes of org.jclouds.io.internal.BasePayloadSlicer$PayloadIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.