Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package org.apache.ignite.internal.catalog.compaction;

import static java.util.stream.Collectors.toUnmodifiableList;
import static org.apache.ignite.internal.ConfigTemplates.DEFAULT_PROFILES;
import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIMEM_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_ROCKSDB_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_TEST_PROFILE_NAME;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
import static org.apache.ignite.internal.testframework.IgniteTestUtils.await;
Expand Down Expand Up @@ -92,26 +92,10 @@ protected int initialNodes() {

@Override
protected String getNodeBootstrapConfigTemplate() {
return "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },\n"
+ " storage.profiles: {"
+ " " + DEFAULT_TEST_PROFILE_NAME + ".engine: test, "
+ " " + DEFAULT_AIPERSIST_PROFILE_NAME + ".engine: aipersist, "
+ " " + DEFAULT_AIMEM_PROFILE_NAME + ".engine: aimem, "
+ " " + DEFAULT_ROCKSDB_PROFILE_NAME + ".engine: rocksdb"
+ " },\n"
+ " storage.engines: { "
+ " aipersist: { checkpoint: { "
+ " intervalMillis: " + CHECK_POINT_INTERVAL_MS
+ " } } "
+ " },\n"
+ " clientConnector.port: {},\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
return renderConfigTemplate(
DEFAULT_PROFILES
+ " storage.engines.aipersist.checkpoint.intervalMillis: " + CHECK_POINT_INTERVAL_MS + ",\n"
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

package org.apache.ignite.internal.catalog.compaction;

import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIMEM_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_ROCKSDB_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_TEST_PROFILE_NAME;
import static org.apache.ignite.internal.ConfigTemplates.DEFAULT_PROFILES;
import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.MatcherAssert.assertThat;
Expand Down Expand Up @@ -48,26 +46,10 @@ class ItNodeRecoveryAfterCatalogTruncatedAboveStoredLwmTest extends ClusterPerTe

@Override
protected String getNodeBootstrapConfigTemplate() {
return "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },\n"
+ " storage.profiles: {"
+ " " + DEFAULT_TEST_PROFILE_NAME + ".engine: test, "
+ " " + DEFAULT_AIPERSIST_PROFILE_NAME + ".engine: aipersist, "
+ " " + DEFAULT_AIMEM_PROFILE_NAME + ".engine: aimem, "
+ " " + DEFAULT_ROCKSDB_PROFILE_NAME + ".engine: rocksdb"
+ " },\n"
+ " storage.engines: { "
+ " aipersist: { checkpoint: { "
+ " intervalMillis: " + 250
+ " } } "
+ " },\n"
+ " clientConnector.port: {},\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
return renderConfigTemplate(
DEFAULT_PROFILES
+ " storage.engines.aipersist.checkpoint.intervalMillis: 250,\n"
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class NodeConfig {
public static String restSslBootstrapConfig(@Nullable String ciphers) {
return "ignite {\n"
+ " network: {\n"
+ " listenAddresses: [127.0.0.1],\n"
+ " port: {},\n"
+ " nodeFinder: {\n"
+ " netClusterNodes: [ {} ]\n"
Expand Down Expand Up @@ -84,6 +85,7 @@ public static String restSslBootstrapConfig(@Nullable String ciphers) {
public static String clientConnectorSslBootstrapConfig(@Nullable String ciphers) {
return "ignite {\n"
+ " network: {\n"
+ " listenAddresses: [127.0.0.1],\n"
+ " port: {},\n"
+ " nodeFinder: {\n"
+ " netClusterNodes: [ {} ]\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import static org.apache.ignite.internal.ConfigTemplates.DISABLED_FAILURE_DETECTION_NODE_BOOTSTRAP_CFG_TEMPLATE;
import static org.apache.ignite.internal.ConfigTemplates.FAST_FAILURE_DETECTION_NODE_BOOTSTRAP_CFG_TEMPLATE;
import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
Expand Down Expand Up @@ -68,17 +69,10 @@ class ItLogicalTopologyTest extends ClusterPerTestIntegrationTest {
private static final String[] STORAGE_PROFILES_LIST = {"lru_rocks", "segmented_aipersist"};

@Language("HOCON")
private static final String NODE_BOOTSTRAP_CFG_TEMPLATE_WITH_NODE_ATTRIBUTES_AND_STORAGE_PROFILES = "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },\n"
+ " nodeAttributes.nodeAttributes: {region = US, storage = SSD},\n"
private static final String NODE_BOOTSTRAP_CFG_TEMPLATE_WITH_NODE_ATTRIBUTES_AND_STORAGE_PROFILES = renderConfigTemplate(
" nodeAttributes.nodeAttributes: {region = US, storage = SSD},\n"
+ " storage.profiles: {lru_rocks.engine = rocksdb, segmented_aipersist.engine = aipersist},\n"
+ " clientConnector.port: {},\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
);

private final LogicalTopologyEventListener listener = new LogicalTopologyEventListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@

package org.apache.ignite.internal;

import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIMEM_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_ROCKSDB_PROFILE_NAME;

import java.lang.reflect.Method;
import java.nio.file.Path;
import java.util.Collections;
Expand All @@ -33,21 +29,6 @@
*/
@SuppressWarnings("CallToSystemGetenv")
public class PlatformCompatibilityTestNodeRunner {
private static final String NODE_BOOTSTRAP_CFG_TEMPLATE = "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },\n"
+ " storage.profiles: {"
+ " " + DEFAULT_AIPERSIST_PROFILE_NAME + ".engine: aipersist, "
+ " " + DEFAULT_AIMEM_PROFILE_NAME + ".engine: aimem, "
+ " " + DEFAULT_ROCKSDB_PROFILE_NAME + ".engine: rocksdb"
+ " },\n"
+ " clientConnector.port: {},\n"
+ " clientConnector.sendServerExceptionStackTraceToClient: true,\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";

/**
* Entry point.
Expand All @@ -66,7 +47,7 @@ public static void main(String[] args) throws Exception {
System.out.println(">>> Ports: node=" + port + ", http=" + httpPort + ", client=" + clientPort);

ClusterConfiguration clusterConfiguration = ClusterConfiguration.builder(new PlatformTestInfo(), Path.of(workDir))
.defaultNodeBootstrapConfigTemplate(NODE_BOOTSTRAP_CFG_TEMPLATE)
.defaultNodeBootstrapConfigTemplate(CompatibilityTestBase.NODE_BOOTSTRAP_CFG_TEMPLATE)
.basePort(port)
.baseHttpPort(httpPort)
.baseClientPort(clientPort)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.ignite.internal.compute;

import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.IgniteExceptionTestUtils.traceableException;
import static org.apache.ignite.internal.testframework.matchers.CompletableFutureExceptionMatcher.willThrow;
import static org.apache.ignite.internal.wrapper.Wrappers.unwrap;
Expand Down Expand Up @@ -71,19 +72,12 @@ protected int[] cmgMetastoreNodes() {

@Override
protected String getNodeBootstrapConfigTemplate() {
return "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },\n"
+ " clientConnector.port: {},\n"
+ " rest.port: {},\n"
+ " compute: {"
return renderConfigTemplate(
" compute: {\n"
+ " threadPoolSize: 1,\n"
+ " statesLifetimeMillis: 1000\n"
+ " },\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
);
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.ignite.internal.distributionzones;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_ROCKSDB_PROFILE_NAME;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
Expand Down Expand Up @@ -93,17 +94,10 @@ public class ItDistributionZonesFiltersTest extends ClusterPerTestIntegrationTes

@Language("HOCON")
private static String createStartConfig(@Language("HOCON") String nodeAttributes, @Language("HOCON") String storageProfiles) {
return "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },"
+ " nodeAttributes.nodeAttributes: " + nodeAttributes + ",\n"
return renderConfigTemplate(
" nodeAttributes.nodeAttributes: " + nodeAttributes + ",\n"
+ " storage.profiles: " + storageProfiles + ",\n"
+ " clientConnector.port: {},\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.ignite.internal.rebalance;

import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.apache.ignite.internal.TestWrappers.unwrapTableManager;
import static org.apache.ignite.internal.TestWrappers.unwrapTableViewInternal;
Expand Down Expand Up @@ -61,35 +62,13 @@ public class ItRebalanceTriggersRecoveryTest extends ClusterPerTestIntegrationTe

private static final int PARTITION_ID = 0;

private static final String US_NODE_BOOTSTRAP_CFG_TEMPLATE = "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder: {\n"
+ " netClusterNodes: [ {} ]\n"
+ " }\n"
+ " },\n"
+ " clientConnector: { port:{} },\n"
+ " nodeAttributes: {\n"
+ " nodeAttributes: {region: US, zone: global}\n"
+ " },\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";

private static final String GLOBAL_NODE_BOOTSTRAP_CFG_TEMPLATE = "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder: {\n"
+ " netClusterNodes: [ {} ]\n"
+ " }\n"
+ " },\n"
+ " clientConnector: { port:{} },\n"
+ " nodeAttributes: {\n"
+ " nodeAttributes: {zone: global}\n"
+ " },\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
private static final String US_NODE_BOOTSTRAP_CFG_TEMPLATE = renderConfigTemplate(
" nodeAttributes.nodeAttributes: {region: US, zone: global},\n"
);

private static final String GLOBAL_NODE_BOOTSTRAP_CFG_TEMPLATE = renderConfigTemplate(
" nodeAttributes.nodeAttributes: {zone: global},\n"
);

@Override
protected int initialNodes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIMEM_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_ROCKSDB_PROFILE_NAME;
import static org.apache.ignite.internal.ConfigTemplates.DEFAULT_PROFILES;
import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.apache.ignite.internal.TestWrappers.unwrapTableImpl;
import static org.apache.ignite.internal.catalog.CatalogService.DEFAULT_STORAGE_PROFILE;
Expand Down Expand Up @@ -137,21 +136,10 @@ class ItTableRaftSnapshotsTest extends ClusterPerTestIntegrationTest {
* <p>installSnapshotTimeoutMillis is changed to 10 seconds so that sporadic snapshot installation failures still
* allow tests pass thanks to retries.
*/
private static final String NODE_BOOTSTRAP_CFG = "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder.netClusterNodes: [ {} ]\n"
+ " },\n"
private static final String NODE_BOOTSTRAP_CFG = renderConfigTemplate(
DEFAULT_PROFILES
+ " raft.installSnapshotTimeoutMillis: 10000,\n"
+ " storage.profiles: {"
+ " " + DEFAULT_AIPERSIST_PROFILE_NAME + ".engine: aipersist, "
+ " " + DEFAULT_AIMEM_PROFILE_NAME + ".engine: aimem, "
+ " " + DEFAULT_ROCKSDB_PROFILE_NAME + ".engine: rocksdb"
+ " },\n"
+ " clientConnector.port: {},\n"
+ " rest.port: {},\n"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
);

/**
* Marker that instructs to create a table with the default storage engine. Used in tests that are indifferent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public String httpsAddress() {

private String bootstrapCfg() {
return "ignite {\n"
+ " network.listenAddresses: [127.0.0.1],\n"
+ " network.port: {},\n"
+ " network.nodeFinder.netClusterNodes: [ {} ],\n"
+ " clientConnector.port: {},\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.ignite.internal.client;

import static org.apache.ignite.internal.ConfigTemplates.renderConfigTemplate;
import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
import static org.apache.ignite.internal.sql.engine.util.SqlTestUtils.executeUpdate;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -68,18 +69,9 @@ public class ItClientDirectMappingTest extends ClusterPerClassIntegrationTest {
protected static final int PARTITIONS = 10;

/** Nodes bootstrap configuration pattern. */
private static final String NODE_BOOTSTRAP_CFG_TEMPLATE = "ignite {\n"
+ " network: {\n"
+ " port: {},\n"
+ " nodeFinder: {\n"
+ " netClusterNodes: [ {} ]\n"
+ " }\n"
+ " },\n"
+ " clientConnector: { port:{} },\n"
+ " rest.port: {},\n"
+ " raft: { responseTimeoutMillis: 30000 },"
+ " failureHandler.dumpThreadsOnFailure: false\n"
+ "}";
private static final String NODE_BOOTSTRAP_CFG_TEMPLATE = renderConfigTemplate(
" raft.responseTimeoutMillis: 30000,\n"
);

@BeforeAll
public static void setup() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ private void createCluster(TestInfo testInfo, int numNodes) {

for (int port : ports) {
String config = "ignite {"
+ " network.listenAddresses: [127.0.0.1],"
+ " network.port: " + port + ","
+ " clientConnector.port: " + (port + 8000) + ","
+ " network.nodeFinder.netClusterNodes: " + nodeFinderConfig + ","
Expand Down
Loading