Package org.springframework.xd.dirt.cluster

Examples of org.springframework.xd.dirt.cluster.Container


    assertEquals(groups, attributes.getGroups());
  }

  @Test
  public void updateContainerAttributes() {
    Container foundContainer = containerRepository.findOne(id);
    assertNotNull(foundContainer);
    ContainerAttributes containerAttributes = new ContainerAttributes(id).setPid(12345).setHost("randomHost").setIp(
        "randomIP");
    containerAttributes.put("groups", "test1,test2");
    Container entity = new Container(id, containerAttributes);
    containerRepository.update(entity);
    assertSavedContainer(id, containerAttributes);
  }
View Full Code Here


    exception.expect(ZooKeeperAccessException.class);
    exception.expectMessage("Could not find container with id " + id + 10);
    ContainerAttributes containerAttributes = new ContainerAttributes(id + 10).setPid(12345).setHost("randomHost").setIp(
        "randomIP");
    containerAttributes.put("groups", "test1,test2");
    Container entity = new Container(id + 10, containerAttributes);
    containerRepository.update(entity);
  }
View Full Code Here

    containerRepository.update(entity);
  }

  @Test
  public void findContainerNoGroups() {
    Container foundContainer = containerRepository.findOne(id2);
    assertNotNull(foundContainer);
    ContainerAttributes attributes = foundContainer.getAttributes();
    assertNotNull(attributes);
    assertEquals(id2, attributes.getId());
    assertEquals(pid, attributes.getPid());
    assertEquals(host, attributes.getHost());
    assertEquals(ip, attributes.getIp());
View Full Code Here

    PageRequest pageable = new PageRequest(0, 20);
    ContainerAttributes attributes1 = new ContainerAttributes("1").setPid(1234).setHost("host1").setIp("127.0.0.1");
    ContainerAttributes attributes2 = new ContainerAttributes("2").setPid(2345).setHost("host2").setIp(
        "192.168.2.1");
    List<DetailedContainer> containers = new ArrayList<DetailedContainer>();
    Container container1 = new Container(attributes1.getId(), attributes1);
    Container container2 = new Container(attributes2.getId(), attributes2);
    containers.add(new DetailedContainer(container1));
    containers.add(new DetailedContainer(container2));
    Page<DetailedContainer> pagedEntity = new PageImpl<DetailedContainer>(containers);
    when(containerRepository.findAllRuntimeContainers(pageable)).thenReturn(pagedEntity);
    when(containerRepository.findOne("1")).thenReturn(container1);
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.cluster.Container

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.