Skip to content

Commit

Permalink
Reduce the test execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashatyrev committed Feb 4, 2025
1 parent 9e60deb commit 698af01
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ public class DasSyncAcceptanceTest extends AcceptanceTestBase {

private final int subnetCount = 128;
private final int defaultCustodySubnetCount = 4;
private final int fuluEpoch = 2;
private final int fuluEpoch = 1;

@Test
public void shouldSyncToNodeWithGreaterFinalizedEpoch() throws Exception {
final int secondNodeStartEpoch = fuluEpoch + 1;
final int finalCheckEpoch = secondNodeStartEpoch + 2;
final TekuBeaconNode primaryNode =
createTekuBeaconNode(
createConfigBuilder()
Expand All @@ -45,16 +47,16 @@ public void shouldSyncToNodeWithGreaterFinalizedEpoch() throws Exception {
UInt64 genesisTime = primaryNode.getGenesisTime();
final TekuBeaconNode lateJoiningNode =
createLateJoiningNode(primaryNode, genesisTime.intValue());
primaryNode.waitForEpochAtOrAbove(fuluEpoch + 1, Duration.ofMinutes(5));
primaryNode.waitForEpochAtOrAbove(secondNodeStartEpoch, Duration.ofMinutes(5));

lateJoiningNode.start();
lateJoiningNode.waitForGenesis();
lateJoiningNode.waitUntilInSyncWith(primaryNode);
lateJoiningNode.waitForEpochAtOrAbove(6, Duration.ofMinutes(5));
lateJoiningNode.waitForEpochAtOrAbove(finalCheckEpoch, Duration.ofMinutes(5));
lateJoiningNode.waitUntilInSyncWith(primaryNode);

int epochSlots = primaryNode.getSpec().slotsPerEpoch(UInt64.ZERO);
int endSlot = 6 * epochSlots;
int endSlot = (finalCheckEpoch + 1) * epochSlots;
int firstFuluSlot = fuluEpoch * epochSlots;
int totalColumns =
IntStream.range(firstFuluSlot, endSlot)
Expand Down Expand Up @@ -113,7 +115,7 @@ private TekuNodeConfigBuilder createConfigBuilder() throws IOException {
.withBellatrixEpoch(UInt64.valueOf(0))
.withCapellaEpoch(UInt64.valueOf(0))
.withDenebEpoch(UInt64.valueOf(0))
.withElectraEpoch(UInt64.valueOf(1))
.withElectraEpoch(UInt64.valueOf(0))
.withFuluEpoch(UInt64.valueOf(fuluEpoch))
.withStubExecutionEngine()
.withStubBlobCount(Optional.of(1))
Expand Down

0 comments on commit 698af01

Please sign in to comment.