Skip to content

Commit 0036416

Browse files
committed
chore: Remove Validator concept from Otter Framework
Fix #19261 Signed-off-by: Timo Brandstätter <[email protected]>
1 parent a24192e commit 0036416

File tree

7 files changed

+0
-282
lines changed

7 files changed

+0
-282
lines changed

platform-sdk/consensus-otter-tests/src/test/java/org/hiero/otter/test/BirthRoundMigrationTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ void testBirthRoundMigration(TestEnvironment env) throws InterruptedException {
7171
timeManager.waitFor(THIRTY_SECONDS);
7272

7373
// Validations
74-
env.validator().assertPlatformStatus().assertMetrics();
75-
7674
assertThat(network.getLogResults()).noMessageWithLevelHigherThan(WARN);
7775
assertThat(network.getConsensusResult())
7876
.hasAdvancedSince(freezeRound)

platform-sdk/consensus-otter-tests/src/test/java/org/hiero/otter/test/HappyPathTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.hiero.otter.fixtures.OtterTest;
1616
import org.hiero.otter.fixtures.TestEnvironment;
1717
import org.hiero.otter.fixtures.TimeManager;
18-
import org.hiero.otter.fixtures.Validator.Profile;
1918
import org.hiero.otter.fixtures.result.MultipleNodeLogResults;
2019
import org.junit.jupiter.api.Disabled;
2120

@@ -36,8 +35,6 @@ void testHappyPath(TestEnvironment env) throws InterruptedException {
3635
timeManager.waitFor(Duration.ofMinutes(2L));
3736

3837
// Validations
39-
env.validator().validateRemaining(Profile.DEFAULT);
40-
4138
final MultipleNodeLogResults logResults =
4239
network.getLogResults().ignoring(network.getNodes().getFirst()).ignoring(STARTUP);
4340
assertThat(logResults).noMessageWithLevelHigherThan(Level.INFO);

platform-sdk/consensus-otter-tests/src/test/java/org/hiero/otter/test/SandboxTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import static com.swirlds.logging.legacy.LogMarker.SOCKET_EXCEPTIONS;
55
import static com.swirlds.logging.legacy.LogMarker.TESTING_EXCEPTIONS_ACCEPTABLE_RECONNECT;
66
import static org.hiero.otter.fixtures.OtterAssertions.assertThat;
7-
import static org.hiero.otter.fixtures.Validator.EventStreamConfig.ignoreNode;
8-
import static org.hiero.otter.fixtures.Validator.RatioConfig.within;
97

108
import java.time.Duration;
119
import java.util.List;
@@ -16,7 +14,6 @@
1614
import org.hiero.otter.fixtures.OtterTest;
1715
import org.hiero.otter.fixtures.TestEnvironment;
1816
import org.hiero.otter.fixtures.TimeManager;
19-
import org.hiero.otter.fixtures.Validator.Profile;
2017
import org.junit.jupiter.api.Disabled;
2118

2219
public class SandboxTest {
@@ -53,12 +50,6 @@ void testConsistencyNDReconnect(TestEnvironment env) throws InterruptedException
5350
timeManager.waitFor(TWO_MINUTES);
5451

5552
// Validations
56-
env.validator()
57-
.assertStdOut()
58-
.eventStream(ignoreNode(node))
59-
.reconnectEventStream(node)
60-
.validateRemaining(Profile.DEFAULT);
61-
6253
assertThat(network.getLogResults()
6354
.ignoring(SOCKET_EXCEPTIONS)
6455
.ignoring(TESTING_EXCEPTIONS_ACCEPTABLE_RECONNECT))
@@ -85,11 +76,5 @@ void testBranching(TestEnvironment env) throws InterruptedException {
8576

8677
// Wait for one minute
8778
timeManager.waitFor(ONE_MINUTE);
88-
89-
// Validations
90-
env.validator()
91-
.consensusRatio(within(0.8, 1.0))
92-
.staleRatio(within(0.0, 0.1))
93-
.validateRemaining(Profile.HASHGRAPH);
9479
}
9580
}

platform-sdk/consensus-otter-tests/src/testFixtures/java/org/hiero/otter/fixtures/TestEnvironment.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ public interface TestEnvironment {
3535
@NonNull
3636
TransactionGenerator generator();
3737

38-
/**
39-
* Get the validator associated with this test environment.
40-
*
41-
* @return the validator
42-
*/
43-
@NonNull
44-
Validator validator();
45-
4638
/**
4739
* Destroys the test environment. Once this method is called, the test environment and all its
4840
* components are no longer usable. This method is idempotent, meaning that it is safe to call

platform-sdk/consensus-otter-tests/src/testFixtures/java/org/hiero/otter/fixtures/Validator.java

Lines changed: 0 additions & 147 deletions
This file was deleted.

platform-sdk/consensus-otter-tests/src/testFixtures/java/org/hiero/otter/fixtures/turtle/TurtleTestEnvironment.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
import org.hiero.otter.fixtures.TestEnvironment;
3131
import org.hiero.otter.fixtures.TimeManager;
3232
import org.hiero.otter.fixtures.TransactionGenerator;
33-
import org.hiero.otter.fixtures.Validator;
3433
import org.hiero.otter.fixtures.logging.internal.InMemoryAppender;
35-
import org.hiero.otter.fixtures.validator.ValidatorImpl;
3634

3735
/**
3836
* A test environment for the Turtle framework.
@@ -180,16 +178,6 @@ public TransactionGenerator generator() {
180178
return generator;
181179
}
182180

183-
/**
184-
* {@inheritDoc}
185-
*/
186-
@Override
187-
@NonNull
188-
public Validator validator() {
189-
log.warn("Validator is not implemented yet");
190-
return new ValidatorImpl();
191-
}
192-
193181
/**
194182
* {@inheritDoc}
195183
*/

platform-sdk/consensus-otter-tests/src/testFixtures/java/org/hiero/otter/fixtures/validator/ValidatorImpl.java

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)