From d45ee8dc5487061f9b5ff952136809403a3ae981 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 21 Apr 2023 10:16:29 -0600 Subject: [PATCH] Test that we reverted activation bug fix --- itests/ccupgrade_test.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/itests/ccupgrade_test.go b/itests/ccupgrade_test.go index 819340ea1..030e115f8 100644 --- a/itests/ccupgrade_test.go +++ b/itests/ccupgrade_test.go @@ -68,12 +68,13 @@ func runTestCCUpgrade(t *testing.T) *kit.TestFullNode { require.NoError(t, err) require.Len(t, sl, 1, "expected 1 sector") require.Equal(t, CCUpgrade, sl[0], "unexpected sector number") - { - si, err := client.StateSectorGetInfo(ctx, maddr, CCUpgrade, types.EmptyTSK) - require.NoError(t, err) - require.NotNil(t, si) - require.Less(t, 50000, int(si.Expiration)) - } + + si, err := client.StateSectorGetInfo(ctx, maddr, CCUpgrade, types.EmptyTSK) + require.NoError(t, err) + require.NotNil(t, si) + require.Less(t, 50000, int(si.Expiration)) + require.True(t, si.ReplacedSectorAge == 0) + client.WaitForSectorActive(ctx, t, CCUpgrade, maddr) //stm: @SECTOR_CC_UPGRADE_001 @@ -100,6 +101,12 @@ func runTestCCUpgrade(t *testing.T) *kit.TestFullNode { CCUpgrade: {}, }) + siUpdate, err := client.StateSectorGetInfo(ctx, maddr, CCUpgrade, types.EmptyTSK) + require.NoError(t, err) + require.NotNil(t, siUpdate) + require.True(t, siUpdate.SectorKeyCID != nil) + require.True(t, siUpdate.Activation > si.Activation) + return client }