[
https://issues.apache.org/jira/browse/IGNITE-23226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899054#comment-17899054
]
Ignite TC Bot commented on IGNITE-23226:
----------------------------------------
{panel:title=Branch: [pull/11634/head] Base: [master] : No blockers
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/11634/head] Base: [master] : New Tests
(3)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Service Grid{color} [[tests
3|https://ci2.ignite.apache.org/viewLog.html?buildId=8168458]]
* {color:#013220}IgniteServiceGridTestSuite:
IgniteServiceDeploymentFailureTest.testFailWhenClassNotFound - PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite:
IgniteServiceDeploymentFailureTest.testFailedServiceDescriptorsDynamicConfiguration
- PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite:
IgniteServiceDeploymentFailureTest.testFailedServiceDescriptorsStaticConfiguration
- PASSED{color}
{panel}
[TeamCity *--> Run :: All*
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8168489&buildTypeId=IgniteTests24Java8_RunAll]
> Services: deployment failed but service descriptor stay
> -------------------------------------------------------
>
> Key: IGNITE-23226
> URL: https://issues.apache.org/jira/browse/IGNITE-23226
> Project: Ignite
> Issue Type: Bug
> Reporter: Nikolay Izhikov
> Assignee: Vladislav Novikov
> Priority: Minor
> Labels: ise
> Time Spent: 5h 50m
> Remaining Estimate: 0h
>
> In case service failed to deploy
> {{Ignite.services().serviceDescriptors().isEmpty() == false}}.
> {code:java}
> public class IgniteServiceDeployUnknownClassTest extends
> GridCommonAbstractTest {
> /** */
> private static final String NOOP_SERVICE_CLS_NAME =
> "org.apache.ignite.tests.p2p.NoopService";
> /** */
> public static final String NODE_FILTER_CLS_NAME =
> "org.apache.ignite.tests.p2p.ExcludeNodeFilter";
> /** */
> private static ClassLoader extClsLdr;
> /** {@inheritDoc} */
> @Override protected IgniteConfiguration getConfiguration(String
> igniteInstanceName) throws Exception {
> IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
> cfg.setPeerClassLoadingEnabled(false);
> cfg.setFailureHandler(new StopNodeFailureHandler());
> return cfg;
> }
> /** {@inheritDoc} */
> @Override protected void beforeTest() throws Exception {
> super.beforeTest();
> extClsLdr = getExternalClassLoader();
> }
> /** {@inheritDoc} */
> @Override protected void afterTest() throws Exception {
> stopAllGrids();
> super.afterTest();
> extClsLdr = null;
> }
> /** @throws Exception If failed. */
> @Test
> public void testFailWhenClassNotFound() throws Exception {
> IgniteEx srv = startGrid(getConfiguration("server"));
> IgniteEx cli = startClientGrid(1);
> 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.configuration().getNodeId()))
> .setTotalCount(1);
> assertThrowsWithCause(() -> cli.services().deploy(svcCfg),
> ServiceDeploymentException.class);
> assertTrue(cli.services().serviceDescriptors().isEmpty());
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)