Skip to content

Commit

Permalink
chore: meeting prep
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Klick <[email protected]>
  • Loading branch information
nathanklick committed Sep 14, 2023
1 parent eeb85e9 commit 3fe7a1f
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 17 deletions.
4 changes: 2 additions & 2 deletions fullstack-examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ dependencies { api(platform(project(":fullstack-bom"))) }
testing {
suites {
@Suppress("UnstableApiUsage", "unused")
val fullStackTest by
val fullstack by
registering(JvmTestSuite::class) {
useJUnitJupiter()
dependencies { implementation(project(":fullstack-examples")) }
}
}
}

tasks.assemble.configure { dependsOn(tasks.named("fullStackTestClasses")) }
tasks.assemble.configure { dependsOn(tasks.named("fullstackClasses")) }
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
import com.hedera.fullstack.junit.support.annotations.application.ApplicationNodes;
import com.hedera.fullstack.junit.support.annotations.application.NamedApplicationNode;
import com.hedera.fullstack.junit.support.annotations.application.NamedApplicationNodes;
import com.hedera.fullstack.junit.support.annotations.application.PlatformApplication;
import com.hedera.fullstack.junit.support.annotations.core.FullStackSuite;
import com.hedera.fullstack.junit.support.annotations.core.FullStackTest;
import com.hedera.fullstack.junit.support.annotations.core.ParameterizedFullStackTest;
import com.hedera.fullstack.junit.support.annotations.core.TestExecutionMode;
import com.hedera.fullstack.junit.support.annotations.flow.MaxTestExecutionTime;
import com.hedera.fullstack.junit.support.annotations.flow.WaitForDuration;
import com.hedera.fullstack.junit.support.annotations.resource.ResourceShape;
import com.hedera.fullstack.junit.support.mutators.core.TestMutator;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import org.junit.jupiter.api.DisplayName;
Expand All @@ -33,26 +37,32 @@
import org.junit.jupiter.params.provider.MethodSource;

@FullStackSuite
public class PlatformSignatureVerificationTest {
public class ExampleTest {

@FullStackTest
void testBasicCase() {}

@FullStackTest
@FullStackTest(mode = TestExecutionMode.TIMED_EXECUTION)
@WaitForDuration(value = 5, unit = TimeUnit.MINUTES)
@ApplicationNodes(
value = 4,
shape = @ResourceShape(cpuInMillis = 10_000, memorySize = 64, memoryUnits = StorageUnits.GIGABYTES))
@DisplayName("SSTT: Basic Signatures - Mixed Algorithms - 4 Nodes - 10k TPS")
shape = @ResourceShape(cpuInMillis = 18_000, memorySize = 2, memoryUnits = StorageUnits.GIGABYTES))
@PlatformApplication(
fileName = "StatsSigningTestingTool.jar",
parameters = {"1", "3000", "0", "100", "-1", "10000", "5000"})
@DisplayName("Crypto-Basic-10k-5m")
void testBasicSignaturesMixedAlgorithms() {}

@FullStackTest
@DisplayName("SSTT: Quick Basic Signatures - 2 Nodes - 500 TPS")
@MaxTestExecutionTime(value = 5, unit = TimeUnit.MINUTES)
@NamedApplicationNodes({
@NamedApplicationNode("node1"),
@NamedApplicationNode(value = "node2", shape = @ResourceShape(cpuInMillis = 2500))
@NamedApplicationNode(
value = "node2",
shape = @ResourceShape(cpuInMillis = 18_000, memorySize = 4, memoryUnits = StorageUnits.GIGABYTES))
})
void testQuickBasicSignatures() {}
@PlatformApplication(
fileName = "StatsSigningTestingTool.jar",
parameters = {"1", "3000", "0", "4000", "-1", "10000", "5000"})
@DisplayName("Crypto-LargeTx-50k-20m.json")
void testLargeTxBasicSignatures() {}

static Stream<Arguments> testScalingBasicSignatures() {
return Stream.of(Arguments.of(Named.of("5k TPS", 5000)), Arguments.of(Named.of("10k TPS", 10000)));
Expand All @@ -62,5 +72,5 @@ static Stream<Arguments> testScalingBasicSignatures() {
@DisplayName("SSTT: Scaling Basic Signatures - 4 Nodes")
@ApplicationNodes(6)
@MethodSource
void testScalingBasicSignatures(int tps) {}
void testScalingBasicSignatures(int tps, TestMutator tm) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ class InvalidStateSignatureTest {
@ConfigurationValue(name = "issTestingTool.plannedISSs", value = "180:0-1-2-3"),
})
@DisplayName("ISS-catastrophic-1k-5m")
void catastrophic_1k_5m(Deployment deployment, TestMutator tailor) {
void catastrophic_1k_5m(Deployment deployment, TestMutator tm) {
final PlatformStatusValidator psv = PlatformStatusValidator.builder()
.nodeId("default")
.steps("REPLAYING_EVENTS", "OBSERVING", "CHECKING", "ACTIVE", "CHECKING")
.build();

tailor.validators().add(psv);
tm.validators().add(psv);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ class StatsSigningTest {
})
@Monitors({NodeLivenessMonitor.class, LogMonitor.class, InvalidStateSignatureMonitor.class})
@Validators({NodeStatisticHealthValidator.class})
@DisplayName("Basic 10k TPS - 20 minutes")
void basic() {}
@DisplayName("Crypto-Basic-10k-20m")
void crypto_basic_10k_20m() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.hedera.fullstack.monitoring.api;

import com.hedera.fullstack.test.toolkit.api.model.infrastructure.ApplicationNode;
import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Node;
import java.time.Duration;

@FunctionalInterface
Expand All @@ -28,4 +30,8 @@ public interface Monitor {
default Duration checkInterval() {
return DEFAULT_CHECK_INTERVAL;
}

default boolean appliesTo(Node<?> node) {
return node instanceof ApplicationNode;
}
}
2 changes: 2 additions & 0 deletions fullstack-monitoring-api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module com.hedera.fullstack.monitoring.api {
exports com.hedera.fullstack.monitoring.api;

requires com.hedera.fullstack.test.toolkit;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.hedera.fullstack.readiness.api;

import com.hedera.fullstack.test.toolkit.api.model.infrastructure.ApplicationNode;
import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Node;
import java.time.Duration;

@FunctionalInterface
Expand All @@ -32,4 +34,8 @@ default Duration checkInterval() {
default Duration checkTimeout() {
return DEFAULT_CHECK_TIMEOUT;
}

default boolean appliesTo(Node<?> node) {
return node instanceof ApplicationNode;
}
}
2 changes: 2 additions & 0 deletions fullstack-readiness-api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module com.hedera.fullstack.readiness.api {
exports com.hedera.fullstack.readiness.api;

requires com.hedera.fullstack.test.toolkit;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@

package com.hedera.fullstack.validator.api;

import com.hedera.fullstack.test.toolkit.api.model.infrastructure.ApplicationNode;
import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Node;
import java.util.concurrent.Future;

/**
*
*/
@FunctionalInterface
public interface Validator {

default boolean appliesTo(Node<?> node) {
return node instanceof ApplicationNode;
}

/**
*
* @param context
Expand Down

0 comments on commit 3fe7a1f

Please sign in to comment.