From 37d0de5acecdb319263ff4716e49ed98836fd1de Mon Sep 17 00:00:00 2001 From: Hunter Gregory Date: Tue, 6 Jun 2023 10:15:39 -0700 Subject: [PATCH 1/3] log: indicate when we finish bootup phase --- npm/pkg/dataplane/dataplane.go | 1 + 1 file changed, 1 insertion(+) diff --git a/npm/pkg/dataplane/dataplane.go b/npm/pkg/dataplane/dataplane.go index 18248f06dc..0ab6a76bd6 100644 --- a/npm/pkg/dataplane/dataplane.go +++ b/npm/pkg/dataplane/dataplane.go @@ -134,6 +134,7 @@ func (dp *DataPlane) FinishBootupPhase() { dp.applyInfo.Lock() defer dp.applyInfo.Unlock() + klog.Infof("[DataPlane] finished bootup phase") dp.applyInfo.inBootupPhase = false } From 4b7dd855386e412bd0ae08fe439f3ee97289cc9f Mon Sep 17 00:00:00 2001 From: Hunter Gregory Date: Tue, 6 Jun 2023 10:16:23 -0700 Subject: [PATCH 2/3] test: add extra apply DP for multi job UTs --- npm/pkg/dataplane/dataplane_windows_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/npm/pkg/dataplane/dataplane_windows_test.go b/npm/pkg/dataplane/dataplane_windows_test.go index 4e2cb1f39a..15d412e4cf 100644 --- a/npm/pkg/dataplane/dataplane_windows_test.go +++ b/npm/pkg/dataplane/dataplane_windows_test.go @@ -182,6 +182,8 @@ func testMultiJobCases(t *testing.T, tests []*MultiJobTestCase, finalSleep time. require.FailNow(t, "encountered errors in multi-job test: %+v", errStrings) } + // just care about eventual consistency, so add extra applyDP e.g. in case finishBootupPhase() runs last + dp.applyDataPlaneNow("FINAL APPLY FOR UT") dptestutils.VerifyHNSCache(t, hns, tt.ExpectedSetPolicies, tt.ExpectedEnpdointACLs) }) } From 25b3169e3e42e6a28fa0da79bf4b95b32469bd37 Mon Sep 17 00:00:00 2001 From: Hunter Gregory Date: Wed, 7 Jun 2023 11:41:12 -0700 Subject: [PATCH 3/3] test: check error for applydp --- npm/pkg/dataplane/dataplane_windows_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/pkg/dataplane/dataplane_windows_test.go b/npm/pkg/dataplane/dataplane_windows_test.go index 15d412e4cf..5cd69a23c2 100644 --- a/npm/pkg/dataplane/dataplane_windows_test.go +++ b/npm/pkg/dataplane/dataplane_windows_test.go @@ -183,7 +183,7 @@ func testMultiJobCases(t *testing.T, tests []*MultiJobTestCase, finalSleep time. } // just care about eventual consistency, so add extra applyDP e.g. in case finishBootupPhase() runs last - dp.applyDataPlaneNow("FINAL APPLY FOR UT") + require.NoError(t, dp.applyDataPlaneNow("UT FINAL APPLY")) dptestutils.VerifyHNSCache(t, hns, tt.ExpectedSetPolicies, tt.ExpectedEnpdointACLs) }) }