mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
## What changed? Fix issues with flakereport; see comments for details. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s) <details><summary>Example</summary> <p> ## Flaky Tests Report - 2026-02-25 11:25:50 ### Overall Statistics * **CI Success Rate**: 4/8 (50.00%) * **Total Test Runs**: 261830 * **Total Failures**: 404 * **Overall Failure Rate**: 1.5 per 1000 tests ### Failure Categories Summary | Category | Unique Tests | |----------|--------------| | CI Breakers | 1 | | Crashes | 1 | | Timeouts | 0 | | Flaky Tests | 129 | ### CI Breakers (Failed All Retries) | Test | CI Runs Broken | Total Failures | Last Failure | Links | |------|---------------|----------------|-------------|-------| | `TestVersionWorkflowSuite/v2/Test_DeleteVersion_QueryAfterDeletion` | 1 | 1 | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/1) | ### Crashes | Test | Flake Rate | Last Failure | Links | |------|------------|-------------|-------| | `unit-test` | **100.0% (2/2)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/1) [2](https://github.com/temporalio/temporal/actions/runs/22296780641/job/1) | ### Flaky Tests | Test | Flake Rate | Last Failure | Links | |------|------------|-------------|-------| | `TestClientDataConverterTestSuite` | **100.0% (1/1)** | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560060) | | `PANIC: runtime error: index out of range [0] with length 0 [recovered, repanicked] — in go.temporal.io/server/tests.TestWorkflowUpdateSuite.func21.2` | **100.0% (1/1)** | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560060) | | `PANIC: Fail in goroutine after TestVersioning3FunctionalSuiteV2/TestWorkflowWithPinnedOverride_NoSticky has completed — in TestVersioning3FunctionalSuiteV0/TestActivityRetryAutoUpgradeDuringBackoff` | **100.0% (1/1)** | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `PANIC: Fail in goroutine after TestVersioning3FunctionalSuiteV0/TestPinnedQuery_RollbackDrainedVersion/ForceTaskForwardNoPollForwardForceAsync has completed — in TestVersioning3FunctionalSuiteV2/TestActivityRetryAutoUpgradeDuringBackoff` | **100.0% (1/1)** | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `DATA RACE: Data race detected` | **100.0% (1/1)** | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `PANIC: runtime error: invalid memory address or nil pointer dereference — in go.temporal.io/server/tests.(*DeploymentVersionSuite).TestForceCAN_WithOverrideState.func1` | **100.0% (1/1)** | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestVersioning3FunctionalSuiteV0/TestTransitionDuringTransientTask_WithSignal` | **48.9% (45/92)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456075) [2](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456229) [3](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456270) | | `TestVersioning3FunctionalSuiteV2/TestTransitionDuringTransientTask_WithoutSignal` | **48.9% (45/92)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456093) [2](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456143) [3](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456167) | | `TestVersioning3FunctionalSuiteV2/TestTransitionDuringTransientTask_WithSignal` | **48.9% (45/92)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456136) [2](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) [3](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456112) | | `TestVersioning3FunctionalSuiteV0/TestTransitionDuringTransientTask_WithoutSignal` | **43.4% (36/83)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456143) [2](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456236) [3](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456250) | | `TestVersionWorkflowSuite/v2/Test_DeleteVersion_QueryAfterDeletion` | **42.9% (3/7)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/1) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/1) [3](https://github.com/temporalio/temporal/actions/runs/22373551837/job/1) | | `TestUserData_FetchesUpTree` | **16.7% (1/6)** | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/1) | | `TestNewServerWithOTEL/with_OTEL_Collector_running` | **16.7% (1/6)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/1) | | `TestInterleavedWeightedRoundRobinSchedulerSuite/TestInactiveChannelDeletionRace` | **16.7% (1/6)** | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/1) | | `TestUserData_FetchesActivityToWorkflow` | **16.7% (1/6)** | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/1) | | `TestDeploymentVersionSuiteV0/TestReactivationSignalCache_Deduplication_StartWorkflow` | **16.1% (9/56)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456136) [2](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) [3](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068532) | | `TestNewServer` | **15.4% (2/13)** | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/1) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/1) | | `TestDeploymentVersionSuiteV0/TestReactivationSignalCache_Deduplication_SignalWithStart` | **11.3% (6/53)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512764) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) [3](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198192) | | `TestDeploymentVersionSuiteV0/TestStartWorkflowExecution_ReactivateVersionOnPinned_WithConflictPolicy` | **9.6% (5/52)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512848) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198189) [3](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068462) | | `TestDeploymentVersionSuiteV2/TestVersionScavenger_DeleteOnAdd` | **9.6% (5/52)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512818) [3](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198207) | | `TestDeploymentVersionSuiteV0/TestStartWorkflowExecution_ReactivateVersionOnPinned` | **9.3% (5/54)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512766) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198202) [3](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068483) | | `TestDeploymentVersionSuiteV0/TestSignalWithStartWorkflowExecution_ReactivateVersionOnPinned` | **7.8% (4/51)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512865) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512840) [3](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512870) | | `TestFairnessAutoEnableSuite/Test_Activity_Basic` | **7.7% (4/52)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456112) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512799) [3](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068532) | | `TestDeploymentVersionSuiteV2/TestReactivationSignalCache_Deduplication_UpdateOptions` | **7.7% (4/52)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) [3](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestActivityClientTestSuite/TestActivityScheduleToClose_FiredDuringBackoff` | **7.5% (4/53)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [3](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198228) | | `TestDeploymentVersionSuiteV0/TestReactivationSignalCache_Deduplication_Reset` | **6.0% (3/50)** | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068487) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560087) [3](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114101) | | `TestDeploymentVersionSuiteV0/TestResetWorkflowExecution_ReactivateVersionOnPinned` | **6.0% (3/50)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512828) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) [3](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068520) | | `TestDeploymentVersionSuiteV2/TestVersionMissingTaskQueues_ValidSetRampingVersion` | **6.0% (3/50)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512818) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198207) [3](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114123) | | `TestTaskQueueStats_Pri_Suite/TestRampingAndCurrentAbsorbUnversionedBacklog/ForceTaskForwardForcePollForwardAllowSync` | **5.9% (3/51)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512818) [2](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068532) [3](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114123) | | `TestWorkerDeploymentSuiteV0/TestSetCurrentVersion_Concurrent_DifferentVersions_NoUnexpectedErrors` | **5.9% (3/51)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198193) [3](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestDeploymentVersionSuiteV0/TestUpdateWorkflowExecutionOptions_ReactivateVersionOnPinned` | **5.9% (3/51)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456393) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512824) [3](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestCronTestClientSuite/TestCronWorkflowCompletionStates` | **5.8% (3/52)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512824) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512861) [3](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestCallbacksSuiteCHASM/TestWorkflowNexusCallbacks_CarriedOver/ContinueAsNew` | **5.8% (3/52)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456103) [2](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068523) [3](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestStandaloneActivityTestSuite/TestHeartbeat/HeartbeatKeepsActivityAlive` | **5.8% (3/52)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512824) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198210) [3](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198202) | | `TestCallbacksSuiteCHASM/TestWorkflowNexusCallbacks_CarriedOver/WorkflowRunTimeout` | **5.8% (3/52)** | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456103) [2](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068523) [3](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestWorkerDeploymentSuiteV0/TestDescribeWorkerDeployment_SetCurrentVersion` | **5.8% (3/52)** | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [2](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [3](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198228) | | `TestDeploymentVersionSuiteV0/TestReactivationSignalCache_Deduplication_UpdateOptions` | 4.1% (2/49) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456093) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560043) | | `TestTaskQueueStats_Classic_Suite/TestAddMultipleTasks_ValidateStats_Cached` | 4.0% (2/50) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestTaskQueueStats_Pri_Suite/TestInactiveVersionDoesNotAbsorbUnversionedBacklog/NoTaskForwardNoPollForwardAllowSync` | 4.0% (2/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) [2](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198189) | | `TestTaskQueueStats_Pri_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/ForceTaskForwardForcePollForwardAllowSync` | 4.0% (2/50) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512821) [2](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestWorkerDeploymentSuiteV0/TestSetRampingVersion_AfterDrained` | 4.0% (2/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068420) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestWorkerDeploymentSuiteV2/TestDrainRollbackedVersion` | 4.0% (2/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068525) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestFuncClustersTestSuite/EnableTransitionHistory/TestForceMigration_ResetWorkflow` | 4.0% (2/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456146) [2](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068440) | | `TestDeploymentVersionSuiteV0/TestVersionScavenger_DeleteOnAdd` | 4.0% (2/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068551) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestWorkerDeploymentSuiteV2/TestSetCurrentVersion_Concurrent_DifferentVersions_NoUnexpectedErrors` | 4.0% (2/50) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560090) | | `TestPrioritySuite/TestSubqueue_Migration` | 3.9% (2/51) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) [2](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestCallbacksSuiteCHASM/TestWorkflowNexusCallbacks_CarriedOver/WorkflowFailureRetry` | 3.9% (2/51) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) [2](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560001) | | `TestWorkerDeploymentSuiteV0/TestDrainRollbackedVersion` | 3.9% (2/51) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198228) [2](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068512) | | `TestVersioning3FunctionalSuiteV0/TestPinnedTask_NoProperPoller/NoTaskForwardNoPollForwardForceAsync` | 2.1% (1/48) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068483) | | `TestVersioning3FunctionalSuiteV2/TestPinnedCaN_UpgradeOnCaN_NormalWFT_WithSuggest/ForceTaskForwardNoPollForwardForceAsync` | 2.1% (1/48) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114123) | | `TestDeploymentVersionSuiteV0/TestUpdateWorkflowExecutionOptions_SetImpliedPinnedSuccess` | 2.1% (1/48) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512818) | | `TestGetHistoryFunctionalSuite/DisableTransitionHistory/TestGetWorkflowExecutionHistory_All` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestVersioning3FunctionalSuiteV2/TestUnpinnedCaN` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestVersioningFunctionalSuite/TestWorkflowTaskRedirectInRetryNonFirstTask/NoTaskForwardForcePollForwardAllowSync` | 2.1% (1/48) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456112) | | `TestWorkerDeploymentSuiteV0/TestListWorkerDeployments_TwoVersions_SameDeployment_OneCurrent_OneRamping` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestTaskQueueStats_Classic_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/ForceTaskForwardNoPollForwardForceAsync` | 2.1% (1/48) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456212) | | `TestVersioning3FunctionalSuiteV2/TestWorkflowWithPinnedOverride_NoSticky/ForceTaskForwardForcePollForwardForceAsync` | 2.1% (1/48) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestAdvancedVisibilitySuiteLegacy/TestListWorkflow_StringQuery` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestVersioning3FunctionalSuiteV0/TestChildWorkflowInheritance_ParentPinnedByOverride` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198284) | | `TestStandaloneActivityTestSuite/TestRequestCancel/MismatchedTokenComponentRef` | 2.1% (1/48) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) | | `TestDeploymentVersionSuiteV2/TestVersionMissingTaskQueues_ValidSetCurrentVersion` | 2.1% (1/48) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) | | `TestVersioning3FunctionalSuiteV0/TestPinnedQuery_DrainedVersion_PollersAbsent/ForceTaskForwardNoPollForwardAllowSync` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestVersioning3FunctionalSuiteV0/TestPinnedWorkflowWithLateActivityPoller/ForceTaskForwardNoPollForwardAllowSync` | 2.1% (1/48) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114104) | | `TestTaskQueueStats_Classic_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/ForceTaskForwardForcePollForwardAllowSync` | 2.1% (1/48) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512839) | | `TestDeploymentVersionSuiteV2/TestStartWorkflowExecution_ReactivateVersionOnPinned_WithConflictPolicy` | 2.1% (1/48) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) | | `TestDeploymentVersionSuiteV2/TestSignalWithStartWorkflowExecution_ReactivateVersionOnPinned` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestVersioningFunctionalSuite/TestDispatchQueryOld/ForceTaskForwardNoPollForwardAllowSync` | 2.1% (1/48) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198239) | | `TestVersioningFunctionalSuite/TestWorkflowTaskRedirectInRetryFirstTask/ForceTaskForwardForcePollForwardForceAsync` | 2.1% (1/48) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestTaskQueueStats_Pri_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/ForceTaskForwardForcePollForwardForceAsync` | 2.1% (1/48) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068525) | | `TestWorkerDeploymentSuiteV0/TestDescribeWorkerDeployment_MultipleVersions_Sorted` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestDeploymentVersionSuiteV2/TestDrainageStatus_SetCurrentVersion_YesOpenWFs` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestVersioning3FunctionalSuiteV0/TestAutoUpgradeCaN_UpgradeOnCaN/ForceTaskForwardNoPollForwardAllowSync` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestWorkerDeploymentSuiteV2/TestSetCurrentVersion_Batching` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068420) | | `TestTaskQueueStats_Classic_Suite/TestCurrentAbsorbsUnversionedBacklog_WhenRampingToUnversioned/NoTaskForwardForcePollForwardForceAsync` | 2.0% (1/49) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560082) | | `TestTaskQueueSuite/TestTaskQueueRateLimit_UpdateFromWorkerConfigAndAPI` | 2.0% (1/49) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456111) | | `TestVersioning3FunctionalSuiteV0/TestPinnedQuery_RollbackDrainedVersion/ForceTaskForwardNoPollForwardForceAsync` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestWorkflowUpdateSuite/StickySpeculativeWorkflowTask_AcceptComplete_StickyWorkerUnavailable` | 2.0% (1/49) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560060) | | `TestWorkerDeploymentSuiteV2/TestResourceExhaustedErrors_Converted_To_ReadableMessage` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114116) | | `TestVersioning3FunctionalSuiteV0/TestPinnedCaN_UpgradeOnCaN_TransientWFT_WithSuggest/ForceTaskForwardForcePollForwardForceAsync` | 2.0% (1/49) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) | | `TestVersioning3FunctionalSuiteV2/TestPinnedCaN_UpgradeOnCaN_NormalWFT_PinnedOverride_WithSuggest/NoTaskForwardForcePollForwardAllowSync` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestTaskQueueStats_Pri_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/ForceTaskForwardNoPollForwardForceAsync` | 2.0% (1/49) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestChildWorkflowSuite/TestCronChildWorkflowExecution` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114114) | | `TestNexusStateReplicationTestSuite/DisableTransitionHistory/TestNexusCallbackReplicated` | 2.0% (1/49) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456192) | | `TestWorkerDeploymentSuiteV0/TestSetWorkerDeploymentRampingVersion_WithCurrent_Unset_Ramp` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestFuncClustersTestSuite/EnableTransitionHistory/TestForceMigration_ClosedWorkflow` | 2.0% (1/49) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198205) | | `TestTaskQueueStats_Classic_Suite/TestCurrentVersionAbsorbsUnversionedBacklog_NoRamping/ForceTaskForwardNoPollForwardForceAsync` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114074) | | `TestWorkflowUpdateSuite/SpeculativeWorkflowTask_ScheduleToStartTimeoutOnNormalTaskQueue` | 2.0% (1/49) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560060) | | `TestStandaloneActivityTestSuite/TestRequestCancel/StaleAttemptToken` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestTaskQueueStats_Classic_Suite/TestCurrentVersionAbsorbsUnversionedBacklog_NoRamping/NoTaskForwardForcePollForwardAllowSync` | 2.0% (1/49) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198284) | | `TestVersioning3FunctionalSuiteV2/TestUnpinnedQuery_NoSticky/ForceTaskForwardForcePollForwardForceAsync` | 2.0% (1/49) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512861) | | `TestTaskQueueStats_Classic_Suite/TestRampingAbsorbsUnversionedBacklog_WhenCurrentIsUnversioned/NoTaskForwardForcePollForwardForceAsync` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestTaskQueueStats_Pri_Suite/TestCurrentVersionAbsorbsUnversionedBacklog_NoRamping/NoTaskForwardNoPollForwardAllowSync` | 2.0% (1/49) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456212) | | `TestTaskQueueStats_Pri_Suite/TestRampingAndCurrentAbsorbUnversionedBacklog/NoTaskForwardNoPollForwardAllowSync` | 2.0% (1/49) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560089) | | `TestFuncClustersTestSuite/DisableTransitionHistory/TestForceMigration_ClosedWorkflow` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114115) | | `TestWorkerDeploymentSuiteV0/TestSetRampingVersion_Concurrent_DifferentVersions_NoUnexpectedErrors` | 2.0% (1/49) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) | | `TestTaskQueueStats_Classic_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/NoTaskForwardNoPollForwardAllowSync` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestVersioning3FunctionalSuiteV0/TestPinnedQuery_RollbackDrainedVersion/NoTaskForwardForcePollForwardAllowSync` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestVersioning3FunctionalSuiteV2/TestUnpinnedQuery_NoSticky/NoTaskForwardForcePollForwardAllowSync` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068523) | | `TestDeploymentVersionSuiteV0/TestForceCAN_WithOverrideState` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestVersioningFunctionalSuite/TestDispatchActivityFailCrossTq/NoTaskForwardForcePollForwardAllowSync` | 2.0% (1/49) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068496) | | `TestVersioning3FunctionalSuiteV0/TestPinnedCaN_UpgradeOnCaN_TransientWFT_WithSuggest/ForceTaskForwardNoPollForwardForceAsync` | 2.0% (1/49) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestWorkerDeploymentSuiteV0/TestSetWorkerDeploymentRampingVersion_Batching` | 2.0% (1/49) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestDeploymentVersionSuiteV0/TestDrainageStatus_SetCurrentVersion_NoOpenWFs` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068523) | | `TestScheduleFunctionalSuite/TestNextTimeCache` | 2.0% (1/50) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) | | `TestVersioning3FunctionalSuiteV2/TestUnpinnedQuery_NoSticky/ForceTaskForwardNoPollForwardAllowSync` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestPollerScalingFunctionalSuite/TestPollerScalingDecisionsAreSeenProbabilistically` | 2.0% (1/50) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestFairnessSuite/TestMigration_FromFair` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114116) | | `TestFairnessAutoEnableSuite/TestMigration_FromClassic` | 2.0% (1/50) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560075) | | `TestTaskQueueStats_Pri_Suite/TestMultipleTasks_WithMatchingBehavior_ValidateStats/ForceTaskForwardNoPollForwardAllowSync` | 2.0% (1/50) | 23h ago | [1](https://github.com/temporalio/temporal/actions/runs/22367698230/job/64738198193) | | `TestWorkflowTaskTestSuite/TestWorkflowTaskHeartbeatingWithEmptyResult` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114142) | | `TestAdvancedVisibilitySuite/TestWorkerTaskReachability_Unversioned_InTaskQueue` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestDeploymentVersionSuiteV2/TestDeleteVersion_DeleteRampedVersion` | 2.0% (1/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) | | `TestWorkerDeploymentSuiteV0/TestDeploymentVersionLimits` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114116) | | `TestVersioning3FunctionalSuiteV2/TestPinnedQuery_RollbackDrainedVersion/ForceTaskForwardForcePollForwardForceAsync` | 2.0% (1/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) | | `TestVersioning3FunctionalSuiteV2/TestUnpinnedQuery_NoSticky/NoTaskForwardNoPollForwardAllowSync` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068512) | | `TestDeploymentVersionSuiteV2/TestDeleteVersion_Drained_But_Pollers_Exist` | 2.0% (1/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) | | `TestVersioning3FunctionalSuiteV2/TestQueryWithPinnedOverride_Sticky/ForceTaskForwardForcePollForwardAllowSync` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068512) | | `TestFairnessAutoEnableSuite/TestMigration_FromFair` | 2.0% (1/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) | | `TestVersioning3FunctionalSuiteV0/TestPinnedCaN_UpgradeOnCaN_SpeculativeWFT_NoSuggest/NoTaskForwardNoPollForwardAllowSync` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068525) | | `TestWorkerDeploymentSuiteV0/TestDescribeWorkerDeployment_TwoVersions_Sorted` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068512) | | `TestDeploymentVersionSuiteV2/TestDrainageStatus_SetCurrentVersion_NoOpenWFs` | 2.0% (1/50) | 1h ago | [1](https://github.com/temporalio/temporal/actions/runs/22410112796/job/64881456152) | | `TestDeploymentVersionSuiteV2/TestDeleteVersion_ValidDelete` | 2.0% (1/50) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512833) | | `TestScheduleFunctionalSuite/TestListSchedulesReturnsWorkflowStatus` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068523) | | `TestVersioningFunctionalSuite/TestWorkflowTaskRedirectInRetryFirstTask/ForceTaskForwardForcePollForwardAllowSync` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestCronTestSuite/TestCronWorkflow` | 2.0% (1/50) | 44h ago | [1](https://github.com/temporalio/temporal/actions/runs/22329840058/job/64609560092) | | `TestVersioning3FunctionalSuiteV0/TestPinnedCaN_UpgradeOnCaN_NormalWFT_WithSuggest/ForceTaskForwardNoPollForwardForceAsync` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068420) | | `TestVersioning3FunctionalSuiteV2/TestAutoUpgradeCaN_UpgradeOnCaN/ForceTaskForwardForcePollForwardAllowSync` | 2.0% (1/50) | 38h ago | [1](https://github.com/temporalio/temporal/actions/runs/22337683305/job/64634068472) | | `TestDeploymentVersionSuiteV2/TestReactivationSignalCache_Deduplication_SignalWithStart` | 2.0% (1/50) | 60h ago | [1](https://github.com/temporalio/temporal/actions/runs/22296780641/job/64495114191) | | `TestVersioning3FunctionalSuiteV2/TestPinnedQuery_DrainedVersion_PollersAbsent/ForceTaskForwardNoPollForwardAllowSync` | 2.0% (1/50) | 21h ago | [1](https://github.com/temporalio/temporal/actions/runs/22373551837/job/64758512837) | ### Flaky Suites | Suite | Flake Rate | Last Failure | |-------|------------|-------------| | `TestAcquireShard_DeadlineExceededErrorSuite` | 2.1% (1/47) | 38h ago | | `TestAcquireShard_OwnershipLostErrorSuite` | 2.1% (1/48) | 44h ago | | `TestActivityClientTestSuite` | **8.3% (4/48)** | 1h ago | | `TestActivityTestSuite` | 2.1% (1/48) | 44h ago | | `TestAdminTestSuite` | 2.1% (1/48) | 44h ago | | `TestAdvancedVisibilitySuite` | 4.2% (2/48) | 44h ago | | `TestAdvancedVisibilitySuiteLegacy` | 2.1% (1/48) | 23h ago | | `TestCallbacksSuiteCHASM` | **8.3% (4/48)** | 1h ago | | `TestChasmTestSuiteLegacy` | 2.1% (1/48) | 44h ago | | `TestChildWorkflowSuite` | 2.1% (1/48) | 60h ago | | `TestClientDataConverterTestSuite` | **100.0% (1/1)** | 44h ago | | `TestClientMiscTestSuite` | 2.1% (1/48) | 44h ago | | `TestCronTestClientSuite` | **6.2% (3/48)** | 21h ago | | `TestCronTestSuite` | 2.1% (1/48) | 44h ago | | `TestDLQSuite` | 4.2% (2/48) | 44h ago | | `TestDeploymentVersionSuiteV0` | **62.5% (30/48)** | 1h ago | | `TestDeploymentVersionSuiteV2` | **22.9% (11/48)** | 1h ago | | `TestFairnessAutoEnableSuite` | **8.3% (4/48)** | 1h ago | | `TestFairnessSuite` | 2.1% (1/48) | 60h ago | | `TestFuncClustersTestSuite` | **8.3% (4/48)** | 1h ago | | `TestGetHistoryFunctionalSuite` | 2.1% (1/48) | 23h ago | | `TestNamespaceInterceptorTestSuite` | **6.2% (3/48)** | 38h ago | | `TestNamespaceSuite` | 1.9% (1/53) | 44h ago | | `TestNexusApiTestSuiteWithTemporalFailures` | 2.1% (1/48) | 44h ago | | `TestNexusStateReplicationTestSuite` | 2.1% (1/48) | 1h ago | | `TestNexusWorkflowTestSuite` | 2.1% (1/48) | 44h ago | | `TestPollerScalingFunctionalSuite` | 2.1% (1/48) | 44h ago | | `TestPrioritySuite` | 4.2% (2/48) | 21h ago | | `TestPurgeDLQTasksSuite` | 2.1% (1/48) | 44h ago | | `TestQueryWorkflowSuite` | 2.1% (1/48) | 38h ago | | `TestRawHistoryClientSuite` | 2.1% (1/48) | 44h ago | | `TestRelayTaskTestSuite` | 2.1% (1/47) | 44h ago | | `TestResetWorkflowTestSuite` | 2.1% (1/48) | 44h ago | | `TestScheduleFunctionalSuite` | **6.2% (3/48)** | 21h ago | | `TestStandaloneActivityTestSuite` | **10.4% (5/48)** | 1h ago | | `TestTLSFunctionalSuite` | 2.1% (1/48) | 44h ago | | `TestTaskQueueStats_Classic_Suite` | **18.8% (9/48)** | 1h ago | | `TestTaskQueueStats_Pri_Suite` | **25.0% (12/48)** | 1h ago | | `TestTaskQueueSuite` | 4.2% (2/48) | 1h ago | | `TestTransientTaskSuite` | 2.1% (1/48) | 44h ago | | `TestUpdateWorkflowSdkSuite` | 2.1% (1/48) | 44h ago | | `TestUserMetadataSuite` | 2.1% (1/47) | 44h ago | | `TestUserTimersTestSuite` | 2.1% (1/47) | 44h ago | | `TestVersionWorkflowSuite` | **20.0% (1/5)** | 21h ago | | `TestVersioning3FunctionalSuiteV0` | **100.0% (48/48)** | 1h ago | | `TestVersioning3FunctionalSuiteV2` | **100.0% (48/48)** | 1h ago | | `TestVersioningFunctionalSuite` | **10.4% (5/48)** | 1h ago | | `TestWorkerDeploymentSuiteV0` | **16.7% (8/48)** | 21h ago | | `TestWorkerDeploymentSuiteV2` | **12.5% (6/48)** | 21h ago | | `TestWorkflowMemoTestSuite` | 2.1% (1/48) | 44h ago | | `TestWorkflowTaskTestSuite` | 4.2% (2/48) | 38h ago | | `TestWorkflowUpdateSuite` | 2.1% (1/48) | 44h ago | </p> </details>
314 lines
10 KiB
Go
314 lines
10 KiB
Go
package flakereport
|
||
|
||
import (
|
||
"testing"
|
||
"time"
|
||
|
||
"github.com/stretchr/testify/assert"
|
||
"github.com/stretchr/testify/require"
|
||
)
|
||
|
||
func TestNormalizeTestName(t *testing.T) {
|
||
tests := []struct {
|
||
name string
|
||
input string
|
||
expected string
|
||
}{
|
||
{
|
||
name: "test with retry suffix",
|
||
input: "TestSomething (retry 1)",
|
||
expected: "TestSomething",
|
||
},
|
||
{
|
||
name: "test with retry suffix and extra spaces",
|
||
input: "TestSomething (retry 5)",
|
||
expected: "TestSomething",
|
||
},
|
||
{
|
||
name: "test without retry suffix",
|
||
input: "TestSomething",
|
||
expected: "TestSomething",
|
||
},
|
||
{
|
||
name: "test with retry in name but not suffix",
|
||
input: "TestRetry",
|
||
expected: "TestRetry",
|
||
},
|
||
}
|
||
|
||
for _, tt := range tests {
|
||
t.Run(tt.name, func(t *testing.T) {
|
||
result := normalizeTestName(tt.input)
|
||
assert.Equal(t, tt.expected, result)
|
||
})
|
||
}
|
||
}
|
||
|
||
func TestParseArtifactName(t *testing.T) {
|
||
tests := []struct {
|
||
name string
|
||
artifactName string
|
||
expectedRunID string
|
||
expectedJobID string
|
||
expectedMatrixName string
|
||
}{
|
||
{
|
||
name: "functional test artifact",
|
||
artifactName: "junit-xml--22373551837--64609560060--1--integration-0--Integration--functional-test",
|
||
expectedRunID: "22373551837",
|
||
expectedJobID: "64609560060",
|
||
expectedMatrixName: "integration-0",
|
||
},
|
||
{
|
||
name: "unit test artifact",
|
||
artifactName: "junit-xml--22373551837--64609560061--1--unit-test",
|
||
expectedRunID: "22373551837",
|
||
expectedJobID: "64609560061",
|
||
expectedMatrixName: "unknown",
|
||
},
|
||
{
|
||
name: "integration test artifact",
|
||
artifactName: "junit-xml--22373551837--64609560062--1--integration-test",
|
||
expectedRunID: "22373551837",
|
||
expectedJobID: "64609560062",
|
||
expectedMatrixName: "unknown",
|
||
},
|
||
{
|
||
name: "artifact name with empty job id",
|
||
artifactName: "junit-xml--22373551837----1--unit-test",
|
||
expectedRunID: "22373551837",
|
||
expectedJobID: "unknown",
|
||
expectedMatrixName: "unknown",
|
||
},
|
||
{
|
||
name: "invalid artifact name",
|
||
artifactName: "test-results",
|
||
expectedRunID: "unknown",
|
||
expectedJobID: "unknown",
|
||
expectedMatrixName: "unknown",
|
||
},
|
||
}
|
||
|
||
for _, tt := range tests {
|
||
t.Run(tt.name, func(t *testing.T) {
|
||
runID, jobID, matrixName := parseArtifactName(tt.artifactName)
|
||
assert.Equal(t, tt.expectedRunID, runID)
|
||
assert.Equal(t, tt.expectedJobID, jobID)
|
||
assert.Equal(t, tt.expectedMatrixName, matrixName)
|
||
})
|
||
}
|
||
}
|
||
|
||
func TestBuildGitHubURL(t *testing.T) {
|
||
tests := []struct {
|
||
name string
|
||
repo string
|
||
runID string
|
||
jobID string
|
||
expectedURL string
|
||
}{
|
||
{
|
||
name: "with job ID",
|
||
repo: "temporalio/temporal",
|
||
runID: "12345678",
|
||
jobID: "87654321",
|
||
expectedURL: "https://github.com/temporalio/temporal/actions/runs/12345678/job/87654321",
|
||
},
|
||
{
|
||
name: "without job ID",
|
||
repo: "temporalio/temporal",
|
||
runID: "12345678",
|
||
jobID: "unknown",
|
||
expectedURL: "https://github.com/temporalio/temporal/actions/runs/12345678",
|
||
},
|
||
{
|
||
name: "with empty job ID",
|
||
repo: "temporalio/temporal",
|
||
runID: "12345678",
|
||
jobID: "",
|
||
expectedURL: "https://github.com/temporalio/temporal/actions/runs/12345678",
|
||
},
|
||
}
|
||
|
||
for _, tt := range tests {
|
||
t.Run(tt.name, func(t *testing.T) {
|
||
url := buildGitHubURL(tt.repo, tt.runID, tt.jobID)
|
||
assert.Equal(t, tt.expectedURL, url)
|
||
})
|
||
}
|
||
}
|
||
|
||
func TestClassifyFailures(t *testing.T) {
|
||
// Simulate the real flow: raw failures → groupFailuresByTest → classifyFailures.
|
||
// groupFailuresByTest normalizes names, stripping suffixes like (timeout), (retry N).
|
||
failures := []TestFailure{
|
||
{Name: "TestNormal"},
|
||
{Name: "TestNormal"},
|
||
{Name: "TestFlaky"},
|
||
{Name: "TestFlaky"},
|
||
{Name: "TestFlaky"},
|
||
{Name: "TestFlaky"},
|
||
{Name: "TestFlaky"},
|
||
{Name: "TestTimeout (timeout)"},
|
||
{Name: "TestTimeout (timeout)"},
|
||
{Name: "TestTimeout (timeout) (retry 1)"},
|
||
{Name: "TestFoo (crash)"},
|
||
{Name: "TestFoo (crash)"},
|
||
}
|
||
|
||
grouped := groupFailuresByTest(failures)
|
||
flaky, timeout, crash := classifyFailures(grouped)
|
||
|
||
// TestFlaky should be in flaky
|
||
assert.Contains(t, flaky, "TestFlaky")
|
||
assert.Len(t, flaky["TestFlaky"], 5)
|
||
|
||
// TestTimeout should be in timeout (normalized key has no suffix)
|
||
assert.Contains(t, timeout, "TestTimeout")
|
||
assert.Len(t, timeout["TestTimeout"], 3)
|
||
|
||
// TestFoo (crash) should be in crash (normalized key has no suffix)
|
||
assert.Contains(t, crash, "TestFoo")
|
||
assert.Len(t, crash["TestFoo"], 2)
|
||
|
||
// TestNormal should be in flaky
|
||
assert.Contains(t, flaky, "TestNormal")
|
||
assert.Len(t, flaky["TestNormal"], 2)
|
||
}
|
||
|
||
func TestFilterParentTests(t *testing.T) {
|
||
makeFailures := func(names ...string) map[string][]TestFailure {
|
||
m := make(map[string][]TestFailure, len(names))
|
||
for _, n := range names {
|
||
m[n] = []TestFailure{{Name: n}}
|
||
}
|
||
return m
|
||
}
|
||
|
||
t.Run("removes parent when subtests observed", func(t *testing.T) {
|
||
grouped := makeFailures("TestFooSuite", "TestFooSuite/TestBar")
|
||
counts := map[string]int{
|
||
"TestFooSuite/TestBar": 10,
|
||
"TestFooSuite/TestBaz": 20,
|
||
}
|
||
filterParentTests(grouped, counts)
|
||
require.NotContains(t, grouped, "TestFooSuite")
|
||
require.Contains(t, grouped, "TestFooSuite/TestBar")
|
||
})
|
||
|
||
t.Run("keeps parent when no subtests observed", func(t *testing.T) {
|
||
grouped := makeFailures("TestStandalone")
|
||
counts := map[string]int{"TestStandalone": 5}
|
||
filterParentTests(grouped, counts)
|
||
require.Contains(t, grouped, "TestStandalone")
|
||
})
|
||
|
||
t.Run("keeps subtest entry regardless", func(t *testing.T) {
|
||
grouped := makeFailures("TestFooSuite/TestBar")
|
||
counts := map[string]int{"TestFooSuite/TestBar": 10}
|
||
filterParentTests(grouped, counts)
|
||
require.Contains(t, grouped, "TestFooSuite/TestBar")
|
||
})
|
||
}
|
||
|
||
func TestGenerateSuiteReports(t *testing.T) {
|
||
now := time.Now()
|
||
twoDaysAgo := now.Add(-48 * time.Hour)
|
||
oneDayAgo := now.Add(-24 * time.Hour)
|
||
|
||
// Each CI run has 2 DB configs ("db-a" and "db-b"), and within each config
|
||
// the suite is spread across 2 shards (distinct JobIDs). The denominator
|
||
// should count unique (RunID × MatrixName) pairs, not raw JobIDs, so shards
|
||
// within the same run+config collapse into one entry.
|
||
failures := []TestFailure{
|
||
// SuiteA: failure in run 1, db-a (shard job 101)
|
||
{Name: "TestFoo", SuiteName: "TestFunctionalSuiteA", RunID: 1, JobID: "101", MatrixName: "db-a", Timestamp: twoDaysAgo},
|
||
// SuiteA: retry failure — should be excluded from suite flake rate
|
||
{Name: "TestFoo (retry 1)", SuiteName: "TestFunctionalSuiteA", RunID: 1, JobID: "101", MatrixName: "db-a", Timestamp: twoDaysAgo},
|
||
// SuiteA: failure in run 2, db-b (shard job 204)
|
||
{Name: "TestBar", SuiteName: "TestFunctionalSuiteA", RunID: 2, JobID: "204", MatrixName: "db-b", Timestamp: oneDayAgo},
|
||
// SuiteB: failure in run 1, db-a
|
||
{Name: "TestBaz", SuiteName: "TestFunctionalSuiteB", RunID: 1, JobID: "101", MatrixName: "db-a", Timestamp: twoDaysAgo},
|
||
}
|
||
|
||
allRuns := []TestRun{
|
||
// SuiteA: runs 1–3, each with db-a (shards 101,102) and db-b (shards 103,104 / 203,204 / 303,304)
|
||
// → 3 runs × 2 DB configs = 6 unique (run, config) pairs
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo", RunID: 1, JobID: "101", MatrixName: "db-a"},
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo", RunID: 1, JobID: "102", MatrixName: "db-a"}, // same (run=1, db-a) pair
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo (retry 1)", RunID: 1, JobID: "101", MatrixName: "db-a"},
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo", RunID: 1, JobID: "103", MatrixName: "db-b"},
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo", RunID: 1, JobID: "104", MatrixName: "db-b"}, // same (run=1, db-b) pair
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestBar", RunID: 2, JobID: "203", MatrixName: "db-a"},
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestBar", RunID: 2, JobID: "204", MatrixName: "db-b"},
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo", RunID: 3, JobID: "301", MatrixName: "db-a"},
|
||
{SuiteName: "TestFunctionalSuiteA", Name: "TestFoo", RunID: 3, JobID: "303", MatrixName: "db-b"},
|
||
// SuiteB present in runs 1, 2, single DB config each
|
||
{SuiteName: "TestFunctionalSuiteB", Name: "TestBaz", RunID: 1, JobID: "101", MatrixName: "db-a"},
|
||
{SuiteName: "TestFunctionalSuiteB", Name: "TestBaz", RunID: 2, JobID: "203", MatrixName: "db-a"},
|
||
// Skipped test should not count
|
||
{SuiteName: "TestFunctionalSuiteC", Name: "TestSkipped", RunID: 1, Skipped: true},
|
||
// Non-suite names should be filtered out
|
||
{SuiteName: "DATA RACE", Name: "DATA RACE: detected", RunID: 1},
|
||
{SuiteName: "TestStandalone", Name: "TestStandalone", RunID: 1},
|
||
// Suite with no failures should be excluded
|
||
{SuiteName: "TestHealthySuite", Name: "TestOk", RunID: 1, MatrixName: "db-a"},
|
||
{SuiteName: "TestHealthySuite", Name: "TestOk", RunID: 2, MatrixName: "db-a"},
|
||
}
|
||
|
||
reports := generateSuiteReports(failures, allRuns)
|
||
|
||
// Should have SuiteA and SuiteB (SuiteC is all skipped)
|
||
require.Len(t, reports, 2)
|
||
|
||
// Sorted by suite name
|
||
require.Equal(t, "TestFunctionalSuiteA", reports[0].SuiteName)
|
||
require.Equal(t, "TestFunctionalSuiteB", reports[1].SuiteName)
|
||
|
||
// SuiteA: 2 failed (run,config) pairs out of 6 total
|
||
// Failed: (run=1, db-a) and (run=2, db-b); retry on (run=1, db-a) doesn't add a new key
|
||
require.Equal(t, 2, reports[0].FailedRuns)
|
||
require.Equal(t, 6, reports[0].TotalRuns)
|
||
require.InDelta(t, 33.3, reports[0].FlakeRate, 0.1)
|
||
require.Equal(t, oneDayAgo, reports[0].LastFailure)
|
||
|
||
// SuiteB: 1 failed (run,config) pair out of 2 total
|
||
require.Equal(t, 1, reports[1].FailedRuns)
|
||
require.Equal(t, 2, reports[1].TotalRuns)
|
||
require.InDelta(t, 50.0, reports[1].FlakeRate, 0.1)
|
||
require.Equal(t, twoDaysAgo, reports[1].LastFailure)
|
||
}
|
||
|
||
func TestNormalizeTestNameFinal(t *testing.T) {
|
||
tests := []struct {
|
||
name string
|
||
input string
|
||
expected string
|
||
}{
|
||
{
|
||
name: "retry with final suffix",
|
||
input: "TestFoo (retry 2) (final)",
|
||
expected: "TestFoo",
|
||
},
|
||
{
|
||
name: "no suffix",
|
||
input: "TestFoo",
|
||
expected: "TestFoo",
|
||
},
|
||
}
|
||
|
||
for _, tt := range tests {
|
||
t.Run(tt.name, func(t *testing.T) {
|
||
require.Equal(t, tt.expected, normalizeTestName(tt.input))
|
||
})
|
||
}
|
||
}
|
||
|
||
func TestIsFinalRetry(t *testing.T) {
|
||
require.True(t, isFinalRetry("TestFoo (retry 2) (final)"))
|
||
require.True(t, isFinalRetry("TestFoo/SubTest (retry 1) (final)"))
|
||
require.False(t, isFinalRetry("TestFoo"))
|
||
require.False(t, isFinalRetry("TestFoo (retry 1)"))
|
||
require.False(t, isFinalRetry("TestFinal"))
|
||
}
|