Skip to content

Commit

Permalink
Upgrade acceptance tests flakiness fix (#8635)
Browse files Browse the repository at this point in the history
* start EL and CL pair together to avoid delay
* give and extra 30 secs to genesis

Signed-off-by: Gabriel Fukushima <[email protected]>

---------

Signed-off-by: Gabriel Fukushima <[email protected]>
  • Loading branch information
gfukushima authored Sep 24, 2024
1 parent cb1ef30 commit c48a2ce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class CapellaUpgradeAcceptanceTest extends AcceptanceTestBase {
@Test
void shouldUpgradeToCapella() throws Exception {
final UInt64 currentTime = timeProvider.getTimeInSeconds();
final int genesisTime = currentTime.plus(30).intValue(); // magic node startup time
final int genesisTime = currentTime.plus(60).intValue(); // magic node startup time
final int shanghaiTime = genesisTime + 4 * 2; // 4 slots, 2 seconds each
final Map<String, String> genesisOverrides =
Map.of("shanghaiTime", String.valueOf(shanghaiTime));
Expand All @@ -51,6 +51,15 @@ void shouldUpgradeToCapella() throws Exception {
genesisOverrides);
primaryEL.start();

TekuBeaconNode primaryNode =
createTekuBeaconNode(
beaconNodeConfigWithForks(genesisTime, primaryEL)
.withStartupTargetPeerCount(0)
.build());

primaryNode.start();
primaryNode.waitForMilestone(SpecMilestone.CAPELLA);

BesuNode secondaryEL =
createBesuNode(
BesuDockerVersion.STABLE,
Expand All @@ -64,15 +73,6 @@ void shouldUpgradeToCapella() throws Exception {
secondaryEL.start();
secondaryEL.addPeer(primaryEL);

TekuBeaconNode primaryNode =
createTekuBeaconNode(
beaconNodeConfigWithForks(genesisTime, primaryEL)
.withStartupTargetPeerCount(0)
.build());

primaryNode.start();
primaryNode.waitForMilestone(SpecMilestone.CAPELLA);

final int primaryNodeGenesisTime = primaryNode.getGenesisTime().intValue();

TekuBeaconNode lateJoiningNode =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DenebUpgradeAcceptanceTest extends AcceptanceTestBase {
@Test
void shouldUpgradeToDeneb() throws Exception {
final UInt64 currentTime = timeProvider.getTimeInSeconds();
final int genesisTime = currentTime.plus(30).intValue(); // magic node startup time
final int genesisTime = currentTime.plus(60).intValue(); // magic node startup time
final int epochDuration = 4 * 2; // 4 slots, 2 seconds each for swift
final int shanghaiTime = genesisTime + epochDuration;
final Map<String, String> genesisOverrides =
Expand All @@ -56,6 +56,15 @@ void shouldUpgradeToDeneb() throws Exception {
genesisOverrides);
primaryEL.start();

TekuBeaconNode primaryNode =
createTekuBeaconNode(
beaconNodeWithTrustedSetup(genesisTime, primaryEL)
.withStartupTargetPeerCount(0)
.build());

primaryNode.start();
primaryNode.waitForMilestone(SpecMilestone.DENEB);

BesuNode secondaryEL =
createBesuNode(
BesuDockerVersion.STABLE,
Expand All @@ -69,15 +78,6 @@ void shouldUpgradeToDeneb() throws Exception {
secondaryEL.start();
secondaryEL.addPeer(primaryEL);

TekuBeaconNode primaryNode =
createTekuBeaconNode(
beaconNodeWithTrustedSetup(genesisTime, primaryEL)
.withStartupTargetPeerCount(0)
.build());

primaryNode.start();
primaryNode.waitForMilestone(SpecMilestone.DENEB);

final int primaryNodeGenesisTime = primaryNode.getGenesisTime().intValue();

TekuBeaconNode lateJoiningNode =
Expand Down

0 comments on commit c48a2ce

Please sign in to comment.