Vladsz83 commented on code in PR #11539:
URL: https://github.com/apache/ignite/pull/11539#discussion_r1773840012
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java:
##########
@@ -152,6 +163,29 @@ public void testServiceDeployment3() throws Exception {
startClientGrid(CLIENT_NODE_WITH_EXT_CLASS_LOADER).services().deploy(serviceConfig());
}
+ /** @throws Exception If failed. */
+ @Test
+ public void testFailWhenNodeFilterClassNotFound() throws Exception {
+ IgniteEx srv = startGrid(SERVER_NODE);
+ IgniteEx cli = startClientGrid(CLIENT_NODE);
+
+ ServiceConfiguration svcCfg = new ServiceConfiguration()
+ .setName("TestDeploymentService")
+
.setService(((Class<Service>)extClsLdr.loadClass(NOOP_SERVICE_CLS_NAME)).getDeclaredConstructor().newInstance())
+
.setNodeFilter(((Class<IgnitePredicate<ClusterNode>>)extClsLdr.loadClass(NODE_FILTER_CLS_NAME))
+ .getConstructor(UUID.class)
+ .newInstance(cli.context().localNodeId()))
+ .setTotalCount(1);
+
+ assertThrowsWithCause(() -> cli.services().deploy(svcCfg),
ServiceDeploymentException.class);
+
+ assertTrue(cli.services().serviceDescriptors().isEmpty());
+ assertTrue(srv.services().serviceDescriptors().isEmpty());
+
+ // Check node alive.
+ srv.createCache(DEFAULT_CACHE_NAME).put(1, 1);
Review Comment:
Suggestion: we might check the client too:
`cli.cache(DEFAULT_CACHE_NAME).put(2, 2);`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]