@Test public void assertRemoveWithNoAppNamePath() { cloudAppConfigurationListener.event(CuratorCacheListener.Type.NODE_DELETED, new ChildData("/config/app", null, "".getBytes()), new ChildData("/config/app", null, "".getBytes())); verify(mesosStateService, times(0)).executors(ArgumentMatchers.any()); verify(producerManager, times(0)).sendFrameworkMessage(any(Protos.ExecutorID.class), any(Protos.SlaveID.class), any()); }
@Override public void event(final Type type, final ChildData oldData, final ChildData data) { String path = Type.NODE_DELETED == type ? oldData.getPath() : data.getPath(); if (Type.NODE_DELETED == type && isJobAppConfigNode(path)) { String appName = path.substring(CloudAppConfigurationNode.ROOT.length() + 1); stopExecutors(appName); } }
CloudAppConfigurationListener implements CuratorCacheListener { @Override public void event(final Type type, final ChildData oldData, final ChildData data) { String path = Type.NODE_DELETED == type ? oldData.getPath() : data.getPath(); if (Type.NODE_DELETED == type && isJobAppConfigNode(path)) { String appName = path.substring(CloudAppConfigurationNode.ROOT.length() + 1); stopExecutors(appName); } } }
CloudAppConfigurationListener implements CuratorCacheListener { @Override public void event(final Type type, final ChildData oldData, final ChildData data) { String path = Type.NODE_DELETED == type ? oldData.getPath() : data.getPath(); if (Type.NODE_DELETED == type && isJobAppConfigNode(path)) { String appName = path.substring(CloudAppConfigurationNode.ROOT.length() + 1); stopExecutors(appName); } } CloudAppConfigurationListener(final CoordinatorRegistryCenter regCenter, final ProducerManager producerManager); }
CloudAppConfigurationListener implements CuratorCacheListener { @Override public void event(final Type type, final ChildData oldData, final ChildData data) { String path = Type.NODE_DELETED == type ? oldData.getPath() : data.getPath(); if (Type.NODE_DELETED == type && isJobAppConfigNode(path)) { String appName = path.substring(CloudAppConfigurationNode.ROOT.length() + 1); stopExecutors(appName); } } CloudAppConfigurationListener(final CoordinatorRegistryCenter regCenter, final ProducerManager producerManager); @Override void event(final Type type, final ChildData oldData, final ChildData data); void start(); void stop(); }
CloudAppConfigurationListener implements CuratorCacheListener { @Override public void event(final Type type, final ChildData oldData, final ChildData data) { String path = Type.NODE_DELETED == type ? oldData.getPath() : data.getPath(); if (Type.NODE_DELETED == type && isJobAppConfigNode(path)) { String appName = path.substring(CloudAppConfigurationNode.ROOT.length() + 1); stopExecutors(appName); } } CloudAppConfigurationListener(final CoordinatorRegistryCenter regCenter, final ProducerManager producerManager); @Override void event(final Type type, final ChildData oldData, final ChildData data); void start(); void stop();  }