@Test public void testGetRequiredOpenPortsWithCustomLoginPort() { SameServerEntity entity = app.createAndManageChild(EntitySpec.create(SameServerEntity.class) .configure(SameServerEntity.REQUIRED_OPEN_LOGIN_PORTS, ImmutableSet.of(2022)) .child( EntitySpec.create(EntityWithConfig.class) .configure(EntityWithConfig.INTEGER, 1) .configure(EntityWithConfig.DOUBLE, 2.0) .configure(EntityWithConfig.STRING, "3"))); SameServerDriverLifecycleEffectorTasks effectorTasks = new SameServerDriverLifecycleEffectorTasks(); Collection<Integer> requiredPorts = effectorTasks.getRequiredOpenPorts(entity); final ImmutableSet<Integer> expected = ImmutableSet.of(2022, 1234); assertEquals(requiredPorts, expected, "expected=" + Iterables.toString(expected) + ", actual=" + Iterables.toString(requiredPorts)); }
protected Collection<Integer> getRequiredOpenPorts() { Set<Integer> result = Sets.newLinkedHashSet(); result.addAll(getRequiredOpenPorts(entity())); LOG.debug("getRequiredOpenPorts detected aggregated default {} for {}", result, this); return result; }
SameServerDriverLifecycleEffectorTasks extends MachineLifecycleEffectorTasks { protected Collection<Integer> getRequiredOpenPorts() { Set<Integer> result = Sets.newLinkedHashSet(); result.addAll(getRequiredOpenPorts(entity())); LOG.debug("getRequiredOpenPorts detected aggregated default {} for {}", result, this); return result; } }
SameServerDriverLifecycleEffectorTasks extends MachineLifecycleEffectorTasks { protected Collection<Integer> getRequiredOpenPorts() { Set<Integer> result = Sets.newLinkedHashSet(); result.addAll(getRequiredOpenPorts(entity())); LOG.debug("getRequiredOpenPorts detected aggregated default {} for {}", result, this); return result; }  }
SameServerDriverLifecycleEffectorTasks extends MachineLifecycleEffectorTasks { protected Collection<Integer> getRequiredOpenPorts() { Set<Integer> result = Sets.newLinkedHashSet(); result.addAll(getRequiredOpenPorts(entity())); LOG.debug("getRequiredOpenPorts detected aggregated default {} for {}", result, this); return result; }   }
SameServerDriverLifecycleEffectorTasks extends MachineLifecycleEffectorTasks { protected Collection<Integer> getRequiredOpenPorts() { Set<Integer> result = Sets.newLinkedHashSet(); result.addAll(getRequiredOpenPorts(entity())); LOG.debug("getRequiredOpenPorts detected aggregated default {} for {}", result, this); return result; }    }