Package org.jclouds.predicates

Examples of org.jclouds.predicates.SocketOpen


      keyPair = ComputeTestUtils.setupKeyPair();
   }


   protected void buildSocketTester() {
      SocketOpen socketOpen = view.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 60, 1, SECONDS);
      // wait a maximum of 60 seconds for port 8080 to open.
      openSocketFinder = context.utils().injector().getInstance(OpenSocketFinder.class);
   }
View Full Code Here


      keyPair = ComputeTestUtils.setupKeyPair();
   }


   protected void buildSocketTester() {
      SocketOpen socketOpen = view.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 60, 1, SECONDS);
      // wait a maximum of 60 seconds for port 8080 to open.
      openSocketFinder = context.utils().injector().getInstance(OpenSocketFinder.class);
   }
View Full Code Here

      keyPair = ComputeTestUtils.setupKeyPair();
   }


   protected void buildSocketTester() {
      SocketOpen socketOpen = view.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 60, 1, SECONDS);
      // wait a maximum of 60 seconds for port 8080 to open.
      openSocketFinder = context.utils().injector().getInstance(OpenSocketFinder.class);
   }
View Full Code Here

      keyPair = ComputeTestUtils.setupKeyPair();
   }


   protected void buildSocketTester() {
      SocketOpen socketOpen = view.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 60, 1, SECONDS);
      // wait a maximum of 60 seconds for port 8080 to open.
      openSocketFinder = context.utils().injector().getInstance(OpenSocketFinder.class);
   }
View Full Code Here

      Map<String, Credentials> credsMap = api.getServerServices().getServerCredentialsList();
      LoginCredentials instanceCredentials = LoginCredentials.fromCredentials(credsMap.get(createdServer.getName()));
      assertNotNull(instanceCredentials);

      HostAndPort socket = HostAndPort.fromParts(createdServer.getIp().getIp(), 22);
      SocketOpen socketOpen = Guice.createInjector().getInstance(SocketOpen.class);
      Predicate<HostAndPort> socketTester = retry(socketOpen, 180, 5, SECONDS);
      socketTester.apply(socket);

      // check that the get credentials call is the same as this
      assertEquals(api.getServerServices().getServerCredentials(createdServer.getId()), instanceCredentials);
View Full Code Here

   @Override
   public void testCorrectAuthException() throws Exception {
   }

   protected void buildSocketTester() {
      SocketOpen socketOpen = createMock(SocketOpen.class);

      expect(socketOpen.apply(HostAndPort.fromParts("144.175.1.1", 22))).andReturn(true).times(5);

      replay(socketOpen);

      socketTester = retry(socketOpen, 1, 1, MILLISECONDS);
     
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setupContext() {
      super.setupContext();
      Injector injector = view.utils().injector();
      SocketOpen socketOpen = injector.getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 300, 1, SECONDS);
      sshFactory = injector.getInstance(Factory.class);
      api = injector.getInstance(TerremarkVCloudClient.class);
   }
View Full Code Here

         adminClient = globalAdminClient;
      }

      injector = cloudStackContext.utils().injector();
      sshFactory = injector.getInstance(SshClient.Factory.class);
      SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 180, 1, 1, SECONDS);
      injector.injectMembers(socketTester);

      jobComplete = retry(new JobComplete(client), 1200, 1, 5, SECONDS);
      injector.injectMembers(jobComplete);
View Full Code Here

      super.setupContext();
      imageId = view.getComputeService().templateBuilder().build().getImage().getId();
        
      client = view.utils().injector().getInstance(ElasticStackClient.class);
      driveNotClaimed = retry(Predicates.not(new DriveClaimed(client)), maxDriveImageTime, 1, SECONDS);
      SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, maxDriveImageTime, 1, SECONDS);
   }
View Full Code Here

   @Override
   @BeforeGroups(groups = { "live" })
   public void setupContext() {
      super.setupContext();
      api = restContext.getApi().getVMApi();
      SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 130, 10, SECONDS);// make
   }
View Full Code Here

TOP

Related Classes of org.jclouds.predicates.SocketOpen

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.