From a4868a17bd6e26e91520255c7383ac11701e4ea6 Mon Sep 17 00:00:00 2001 From: welkin22 Date: Wed, 6 Nov 2024 16:01:35 +0800 Subject: [PATCH] use patch to fix ut instead of changing code --- .github/workflows/unit-test.yaml | 1 + tests/fix_unit_test.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/fix_unit_test.patch diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index feffce65e1..cc1106b4ed 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -19,4 +19,5 @@ jobs: go-version-file: go.mod - run: | git apply tests/0001-diff-go-ethereum.patch + git apply tests/fix_unit_test.patch make test diff --git a/tests/fix_unit_test.patch b/tests/fix_unit_test.patch new file mode 100644 index 0000000000..7567c4ba4c --- /dev/null +++ b/tests/fix_unit_test.patch @@ -0,0 +1,19 @@ +Subject: [PATCH] fix unit test +--- +Index: core/txpool/legacypool/legacypool.go +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go +--- a/core/txpool/legacypool/legacypool.go (revision 1233f69823ec26df160575add475f1e949cde211) ++++ b/core/txpool/legacypool/legacypool.go (date 1730875125704) +@@ -391,7 +391,7 @@ + } + + func (pool *LegacyPool) loopOfSync() { +- ticker := time.NewTicker(200 * time.Second) ++ ticker := time.NewTicker(200 * time.Millisecond) + for { + select { + case <-pool.reorgShutdownCh: