Skip to content

ci: Support ut run-multi for CSE #61352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025
Merged

Conversation

breezewish
Copy link
Member

What problem does this PR solve?

Issue Number: ref #30822

Problem Summary:

What changed and how does it work?

Support run-multi, which is a necessary part for TiDB Cloud CSE CICD.

Also removed listTestCasesConcurrent and just based on listTestCases(.., nil).

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
./tools/bin/ut run-multi --junitfile ./junit.xml ./pkg/util/topsql/collector ./pkg/util/topsql/reporter
2025/05/27 17:39:40 maxprocs: Leaving GOMAXPROCS=14: CPU quota undefined
ok  	github.com/pingcap/tidb/pkg/util/topsql/collector	0.012s
ok  	github.com/pingcap/tidb/pkg/util/topsql/reporter	0.012s
building task finish, maxproc=14, count=39, takes=3.464729583s
run all tasks takes 3.294060709s

Junitfile is used to verify whether multi-packages are indeed involved:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
	<testsuite tests="36" failures="0" time="7.175927" name="github.com/pingcap/tidb/pkg/util/topsql/reporter">
		<properties>
			<property name="go.version" value="go1.24.2 darwin/arm64"></property>
		</properties>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_records_Sort" time="0.029574"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_collecting_appendOthers" time="0.021887"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_record_merge" time="0.020928"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_tsItems_Sort" time="0.016645"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_cpuRecords_topN" time="0.031020"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestPubSubDataSink" time="1.026566"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestReporterWorker" time="3.131159"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_record_append" time="0.033773"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestSingleTargetDataSink" time="0.026104"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestCollectInternal" time="0.020073"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_record_Sort" time="0.030052"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_normalizedPlanMap_take" time="0.022878"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_tsItem_toProto" time="0.020576"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_normalizedSQLMap_take" time="0.015433"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_normalizedPlanMap_register" time="0.030038"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_records_toProto" time="0.026304"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_normalizedSQLMap_toProto" time="0.020832"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestRemoveInvalidPlanRecord" time="0.031565"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_normalizedSQLMap_register" time="0.023717"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestCollectAndTopN" time="0.021479"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestCollectAndSendBatch" time="0.770082"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_collecting_take" time="0.032054"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestDefaultDataSinkRegisterer" time="0.023119"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_collecting_getReportRecords" time="0.020192"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestCollectAndEvicted" time="1.417170"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_records_topN" time="0.030420"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestMultipleDataSinks" time="0.024757"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="TestCollectCapacity" time="0.054373"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_collecting_markAsEvicted_hasEvicted" time="0.030239"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_cpuRecords_Sort" time="0.024815"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_tsItems_toProto" time="0.019612"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_collecting_getOrCreateRecord" time="0.031571"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_record_rebuildTsIndex" time="0.023099"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_normalizedPlanMap_toProto" time="0.021236"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_encodeKey" time="0.031703"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/reporter" name="Test_record_toProto" time="0.020884"></testcase>
	</testsuite>
	<testsuite tests="3" failures="0" time="5.719882" name="github.com/pingcap/tidb/pkg/util/topsql/collector">
		<properties>
			<property name="go.version" value="go1.24.2 darwin/arm64"></property>
		</properties>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/collector" name="TestPProfCPUProfile" time="2.478646"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/collector" name="TestProcessProfCPUProfile" time="3.217943"></testcase>
		<testcase classname="github.com/pingcap/tidb/pkg/util/topsql/collector" name="TestSQLStatsTune" time="0.023293"></testcase>
	</testsuite>
</testsuites>
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 27, 2025
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 27, 2025
Signed-off-by: Wish <[email protected]>
Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented May 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, YangKeao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [YangKeao,hawkingrei]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 27, 2025
Copy link

ti-chi-bot bot commented May 27, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-05-27 09:48:38.838774134 +0000 UTC m=+348849.210561590: ☑️ agreed by hawkingrei.
  • 2025-05-27 10:11:40.843175268 +0000 UTC m=+350231.214962718: ☑️ agreed by YangKeao.

Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.7885%. Comparing base (bd0f52c) to head (f2b6d37).
Report is 7 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61352        +/-   ##
================================================
+ Coverage   73.1861%   73.7885%   +0.6023%     
================================================
  Files          1726       1726                
  Lines        478585     481362      +2777     
================================================
+ Hits         350258     355190      +4932     
+ Misses       106872     104834      -2038     
+ Partials      21455      21338       -117     
Flag Coverage Δ
integration 42.7463% <ø> (?)
unit 72.7811% <ø> (+0.3382%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 46.7520% <ø> (-0.7830%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@breezewish
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 9b7cd6a into pingcap:master May 27, 2025
24 checks passed
@breezewish breezewish deleted the wenxuan/ut2 branch May 27, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants