Search in sources :

Example 1 with TestReconnectSecurityPluginProvider

use of org.apache.ignite.spi.discovery.TestReconnectSecurityPluginProvider in project ignite by apache.

the class GridDiscoveryManagerAttributesSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    if (binaryMarshallerEnabled)
        cfg.setMarshaller(new BinaryMarshaller());
    cfg.setIncludeProperties(PREFER_IPV4);
    cfg.setDeploymentMode(mode);
    cfg.setPeerClassLoadingEnabled(p2pEnabled);
    if (secEnabled)
        cfg.setPluginProviders(new TestReconnectSecurityPluginProvider());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) TestReconnectSecurityPluginProvider(org.apache.ignite.spi.discovery.TestReconnectSecurityPluginProvider)

Example 2 with TestReconnectSecurityPluginProvider

use of org.apache.ignite.spi.discovery.TestReconnectSecurityPluginProvider in project ignite by apache.

the class TcpDiscoveryNodeAttributesUpdateOnReconnectTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);
    if (gridName.contains("client")) {
        Map<String, String> attrs = new HashMap<>();
        attrs.put("test", "1");
        cfg.setUserAttributes(attrs);
    }
    IgniteClientReconnectAbstractTest.TestTcpDiscoverySpi spi = new IgniteClientReconnectAbstractTest.TestTcpDiscoverySpi();
    TcpDiscoveryIpFinder finder = ((TcpDiscoverySpi) cfg.getDiscoverySpi()).getIpFinder();
    spi.setIpFinder(finder);
    cfg.setDiscoverySpi(spi);
    cfg.setPluginProviders(new TestReconnectSecurityPluginProvider());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) HashMap(java.util.HashMap) IgniteClientReconnectAbstractTest(org.apache.ignite.internal.IgniteClientReconnectAbstractTest) TcpDiscoveryIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder) TestReconnectSecurityPluginProvider(org.apache.ignite.spi.discovery.TestReconnectSecurityPluginProvider)

Aggregations

IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)2 TestReconnectSecurityPluginProvider (org.apache.ignite.spi.discovery.TestReconnectSecurityPluginProvider)2 HashMap (java.util.HashMap)1 IgniteClientReconnectAbstractTest (org.apache.ignite.internal.IgniteClientReconnectAbstractTest)1 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)1 TcpDiscoveryIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder)1