Skip to content

Remove duplicate tests#4569

Open
timotheeguerin wants to merge 2 commits into
Azure:mainfrom
timotheeguerin:cleanup/remove-duplicate-tests
Open

Remove duplicate tests#4569
timotheeguerin wants to merge 2 commits into
Azure:mainfrom
timotheeguerin:cleanup/remove-duplicate-tests

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Summary

Remove tests that are exact duplicates (identical test bodies) found across the test suite.

Removed tests

File Duplicate removed Reason
typespec-autorest/test/models.test.ts "errors on duplicate model names" Already exists in openapi-output.test.ts
typespec-azure-core/test/operations.test.ts "Gets Lro for non-standard polling in custom put operations without finalLocation" Identical body to "custom createOrReplace operations without finalLocation" (same decorator used)
typespec-client-generator-core/test/types/model.test.ts "no models don't filter core" Identical to "no models filter core"
typespec-client-generator-core/test/rules/property-name-conflict.test.ts "don't emit " (truncated name) Broken copy — claims to test no-emit but has identical body asserting diagnostic emission
typespec-client-generator-core/test/clients/structure.test.ts "one client from multiple services without version dependency" Identical body to "one client from multiple services"
typespec-client-generator-core/test/examples/load.test.ts "example default config" + "load example without version" Both identical to "example config"

Testing

All tests pass:

  • typespec-autorest: 477 tests ✅
  • typespec-azure-core: 328 tests ✅
  • typespec-client-generator-core: 1322 tests ✅

@microsoft-github-policy-service microsoft-github-policy-service Bot added lib:azure-core Issues for @azure-tools/typespec-azure-core library emitter:autorest Issues for @azure-tools/typespec-autorest emitter lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Jun 5, 2026
@azure-sdk

Copy link
Copy Markdown
Collaborator

No changes needing a change description found.

@pkg-pr-new

pkg-pr-new Bot commented Jun 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-autorest@4569
npm i https://pkg.pr.new/@azure-tools/typespec-azure-core@4569
npm i https://pkg.pr.new/@azure-tools/typespec-client-generator-core@4569

commit: ba0af50

- Remove duplicate 'errors on duplicate model names' test in models.test.ts
  (already covered in openapi-output.test.ts)
- Remove duplicate 'no models don't filter core' test (identical to
  'no models filter core')
- Remove broken 'don't emit' test in property-name-conflict.test.ts
  (truncated name, identical body to previous test)
- Remove duplicate 'one client from multiple services without version
  dependency' test (identical body to 'one client from multiple services')
- Remove duplicate LRO test 'custom put operations without finalLocation'
  (identical to 'custom createOrReplace operations without finalLocation')
- Remove duplicate 'example default config' and 'load example without
  version' tests (identical to 'example config')
@timotheeguerin timotheeguerin force-pushed the cleanup/remove-duplicate-tests branch from 3d55b1d to 88bed31 Compare June 5, 2026 18:11
@azure-sdk

azure-sdk commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

⚡ Benchmark Results

⚠️ 9 metric(s) regressed above the +5% threshold:

Metric Baseline Current Change
total 🔴 599.1ms 🔴 651.8ms +8.8% 🔴
loader 🟢 148.9ms 🟢 192.3ms +29.2% 🔴
resolver 🟢 16.2ms 🟢 20.4ms +26.1% 🔴
validation 🟢 41.0ms 🟢 43.4ms +5.9% 🔴
 ↳ validation/@typespec/versioning 🔴 27.1ms 🔴 28.5ms +5.1% 🔴
 ↳ linter/@azure-tools/typespec-azure-resource-manager/lro-location-header 🟡 13.0ms 🟡 14.6ms +12.5% 🔴
 ↳ emit/@typespec/openapi3 🟢 143.3ms 🟢 151.6ms +5.8% 🔴
 ↳ emit/@typespec/openapi3/compute 🟢 124.7ms 🟢 131.6ms +5.5% 🔴
 ↳ emit/@typespec/openapi3/write 🟢 17.8ms 🟢 20.0ms +12.8% 🔴
Full details – comparing 5e322c1 vs baseline d4128ef
Metric Baseline Current Change
total 🔴 599.1ms 🔴 651.8ms +8.8% 🔴
loader 🟢 148.9ms 🟢 192.3ms +29.2% 🔴
resolver 🟢 16.2ms 🟢 20.4ms +26.1% 🔴
checker 🟢 186.4ms 🟢 187.2ms +0.4%
validation 🟢 41.0ms 🟢 43.4ms +5.9% 🔴
 ↳ validation/@azure-tools/typespec-azure-core 🟢 6.4ms 🟢 6.4ms -0.0%
 ↳ validation/@typespec/http 🟢 5.5ms 🟢 5.4ms -1.9%
 ↳ validation/@typespec/rest 🟢 0.5ms 🟢 0.7ms +30.5%
 ↳ validation/@typespec/versioning 🔴 27.1ms 🔴 28.5ms +5.1% 🔴
 ↳ validation/compiler 🟢 1.3ms 🟢 1.7ms +26.5%
linter 🟢 132.1ms 🟢 136.1ms +3.0%
 ↳ linter/@azure-tools/typespec-azure-core/auth-required 🟢 0.0ms 🟢 0.0ms +1.9%
 ↳ linter/@azure-tools/typespec-azure-core/bad-record-type 🟢 0.2ms 🟢 0.2ms -3.6%
 ↳ linter/@azure-tools/typespec-azure-core/byos 🟢 5.6ms 🟢 6.0ms +7.1%
 ↳ linter/@azure-tools/typespec-azure-core/casing-style 🟢 0.6ms 🟢 0.6ms +6.1%
 ↳ linter/@azure-tools/typespec-azure-core/composition-over-inheritance 🟢 0.1ms 🟢 0.1ms +15.9%
 ↳ linter/@azure-tools/typespec-azure-core/documentation-required 🟢 0.8ms 🟢 0.9ms +12.2%
 ↳ linter/@azure-tools/typespec-azure-core/friendly-name 🟢 0.7ms 🟢 0.6ms -3.9%
 ↳ linter/@azure-tools/typespec-azure-core/key-visibility-required 🟢 0.2ms 🟢 0.2ms +0.2%
 ↳ linter/@azure-tools/typespec-azure-core/known-encoding 🟢 0.3ms 🟢 0.3ms +6.2%
 ↳ linter/@azure-tools/typespec-azure-core/long-running-polling-operation-required 🟢 0.3ms 🟢 0.3ms +1.2%
 ↳ linter/@azure-tools/typespec-azure-core/no-case-mismatch 🟢 0.2ms 🟢 0.3ms +8.6%
 ↳ linter/@azure-tools/typespec-azure-core/no-closed-literal-union 🟢 0.3ms 🟢 0.3ms +4.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-enum 🟢 0.0ms 🟢 0.0ms +21.0%
 ↳ linter/@azure-tools/typespec-azure-core/no-error-status-codes 🟢 0.1ms 🟢 0.1ms -3.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops 🟢 0.1ms 🟢 0.1ms -1.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-format 🟢 0.6ms 🟢 0.6ms -12.8%
 ↳ linter/@azure-tools/typespec-azure-core/no-generic-numeric 🟢 0.4ms 🟢 0.5ms +30.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-header-explode 🟡 18.0ms 🟡 18.8ms +4.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-legacy-usage 🟢 1.1ms 🟢 1.3ms +17.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-multiple-discriminator 🟢 0.1ms 🟢 0.1ms +7.0%
 ↳ linter/@azure-tools/typespec-azure-core/no-nullable 🟢 0.2ms 🟢 0.4ms +52.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-offsetdatetime 🟢 1.2ms 🟢 1.3ms +2.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-openapi 🟢 2.0ms 🟢 2.1ms +5.7%
 ↳ linter/@azure-tools/typespec-azure-core/no-private-usage 🟢 1.8ms 🟢 1.9ms +6.8%
 ↳ linter/@azure-tools/typespec-azure-core/no-query-explode 🟡 19.8ms 🟡 19.1ms -3.5%
 ↳ linter/@azure-tools/typespec-azure-core/no-response-body 🔴 24.5ms 🔴 24.3ms -1.0%
 ↳ linter/@azure-tools/typespec-azure-core/no-rest-library-interfaces 🟢 0.0ms 🟢 0.0ms +16.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-route-parameter-name-mismatch 🟢 4.8ms 🟢 5.0ms +5.8%
 ↳ linter/@azure-tools/typespec-azure-core/no-rpc-path-params 🟢 0.2ms 🟢 0.2ms +1.8%
 ↳ linter/@azure-tools/typespec-azure-core/no-string-discriminator 🟢 0.0ms 🟢 0.0ms +9.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-unknown 🟢 0.2ms 🟢 0.2ms -10.1%
 ↳ linter/@azure-tools/typespec-azure-core/no-unnamed-union 🟢 0.4ms 🟢 0.4ms -0.9%
 ↳ linter/@azure-tools/typespec-azure-core/operation-missing-api-version 🟢 0.2ms 🟢 0.2ms -0.6%
 ↳ linter/@azure-tools/typespec-azure-core/request-body-problem 🟢 0.3ms 🟢 0.3ms +6.4%
 ↳ linter/@azure-tools/typespec-azure-core/require-versioned 🟢 0.0ms 🟢 0.0ms +11.0%
 ↳ linter/@azure-tools/typespec-azure-core/response-schema-problem 🔴 22.5ms 🔴 23.1ms +2.9%
 ↳ linter/@azure-tools/typespec-azure-core/rpc-operation-request-body 🟢 0.3ms 🟢 0.4ms +32.2%
 ↳ linter/@azure-tools/typespec-azure-core/spread-discriminated-model 🟢 0.3ms 🟢 0.3ms -7.4%
 ↳ linter/@azure-tools/typespec-azure-core/use-standard-names 🟢 5.9ms 🟢 5.3ms -11.1%
 ↳ linter/@azure-tools/typespec-azure-core/use-standard-operations 🟢 0.1ms 🟢 0.1ms -1.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-child-resources 🟢 3.9ms 🟢 3.6ms -7.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operations 🟢 0.0ms 🟢 0.0ms +7.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-common-types-version 🟢 3.7ms 🟢 3.7ms +0.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key 🟢 0.1ms 🟢 0.1ms +9.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage 🟢 0.1ms 🟢 0.1ms -6.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes 🟢 1.0ms 🟢 1.0ms -0.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts 🟢 4.2ms 🟢 4.1ms -2.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-record 🟢 0.4ms 🟢 0.4ms -5.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes 🟢 0.4ms 🟢 0.4ms -5.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes 🟢 0.0ms 🟢 0.0ms +33.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment 🟢 0.2ms 🟢 0.2ms -14.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property 🟢 0.1ms 🟢 0.1ms +5.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator 🟢 0.0ms 🟢 0.0ms +1.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb 🟢 0.1ms 🟢 0.1ms -3.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property 🟢 0.1ms 🟢 0.1ms +5.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format 🟢 0.0ms 🟢 0.0ms -2.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars 🟢 0.2ms 🟢 0.2ms +6.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern 🟢 0.0ms 🟢 0.0ms +6.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation 🟢 0.2ms 🟢 0.2ms -8.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response 🟢 4.4ms 🟢 4.2ms -2.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-patch 🟢 0.3ms 🟢 0.3ms -4.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars 🟢 0.2ms 🟢 0.2ms -5.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state 🟢 0.1ms 🟢 0.1ms -5.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels 🟢 0.1ms 🟢 0.1ms -19.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/empty-updateable-properties 🟢 0.1ms 🟢 0.1ms +10.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation 🟢 0.0ms 🟢 0.0ms +4.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/lro-location-header 🟡 13.0ms 🟡 14.6ms +12.5% 🔴
 ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint 🟢 0.0ms 🟢 0.0ms -6.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers 🟢 0.3ms 🟢 0.3ms -9.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-empty-model 🟢 0.1ms 🟢 0.1ms +4.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-override-props 🟢 0.1ms 🟢 0.1ms +1.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation 🟢 0.2ms 🟢 0.2ms +11.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-response-body 🔴 20.0ms 🟡 19.2ms -4.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/patch-envelope 🟢 0.1ms 🟢 0.1ms +1.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/resource-name 🟢 0.1ms 🟢 0.2ms +11.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/secret-prop 🟢 2.2ms 🟢 2.6ms +17.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/unsupported-type 🟢 0.4ms 🟢 0.4ms +2.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/version-progression 🟢 0.0ms 🟢 0.0ms +10.3%
 ↳ linter/@azure-tools/typespec-client-generator-core/property-name-conflict 🟢 1.1ms 🟢 1.1ms -0.8%
 ↳ linter/@azure-tools/typespec-client-generator-core/require-client-suffix 🟢 0.2ms 🟢 0.2ms +10.4%
emit 🔴 5.62s 🔴 5.82s +3.7%
 ↳ emit/@azure-tools/typespec-autorest 🟢 158.1ms 🟢 163.9ms +3.6%
 ↳ emit/@azure-tools/typespec-python 🔴 4.12s 🔴 4.25s +3.4%
 ↳ emit/@typespec/http-client-js 🔴 1.12s 🔴 1.15s +3.0%
 ↳ emit/@typespec/openapi3 🟢 143.3ms 🟢 151.6ms +5.8% 🔴
 ↳ emit/@typespec/openapi3/compute 🟢 124.7ms 🟢 131.6ms +5.5% 🔴
 ↳ emit/@typespec/openapi3/write 🟢 17.8ms 🟢 20.0ms +12.8% 🔴

Averaged across 3 specs (azure-arm-resource-manager, azure-core-dataplane, azure-full).
Threshold: changes > ±5% are highlighted.
🟢 Fast · 🟡 Moderate (stages >200ms, rules >10ms) · 🔴 Slow (stages >400ms, rules >20ms)

@timotheeguerin timotheeguerin marked this pull request as ready for review June 5, 2026 19:53
@microsoft-github-policy-service microsoft-github-policy-service Bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Jun 22, 2026
@timotheeguerin timotheeguerin removed the stale Mark a PR that hasn't been recently updated and will be closed. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:autorest Issues for @azure-tools/typespec-autorest emitter lib:azure-core Issues for @azure-tools/typespec-azure-core library lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants