use of com.aws.greengrass.deployment.ThingGroupHelper in project aws-greengrass-nucleus by aws-greengrass.
the class DeploymentTaskIntegrationTest method setupKernel.
@BeforeAll
static void setupKernel() throws IOException {
kernel = new Kernel();
rootDir = Paths.get(System.getProperty("root"));
NoOpPathOwnershipHandler.register(kernel);
ConfigPlatformResolver.initKernelWithMultiPlatformConfig(kernel, DeploymentTaskIntegrationTest.class.getResource("onlyMain.yaml"));
kernel.launch();
// get required instances from context
componentManager = kernel.getContext().get(ComponentManager.class);
componentStore = kernel.getContext().get(ComponentStore.class);
dependencyResolver = kernel.getContext().get(DependencyResolver.class);
kernelConfigResolver = kernel.getContext().get(KernelConfigResolver.class);
deploymentConfigMerger = kernel.getContext().get(DeploymentConfigMerger.class);
deploymentDocumentDownloader = kernel.getContext().get(DeploymentDocumentDownloader.class);
thingGroupHelper = kernel.getContext().get(ThingGroupHelper.class);
}
use of com.aws.greengrass.deployment.ThingGroupHelper in project aws-greengrass-nucleus by aws-greengrass.
the class PluginComponentTest method launchAndWait.
private void launchAndWait() throws InterruptedException {
CountDownLatch mainRunning = new CountDownLatch(1);
kernel.getContext().addGlobalStateChangeListener((service, oldState, newState) -> {
if (service.getName().equals("main") && newState.equals(State.FINISHED)) {
mainRunning.countDown();
}
});
kernel.launch();
thingGroupHelper = kernel.getContext().get(ThingGroupHelper.class);
assertTrue(mainRunning.await(5, TimeUnit.SECONDS));
}
Aggregations