Skip to content

Conversation

@asnare
Copy link
Contributor

@asnare asnare commented Dec 23, 2025

Changes

What does this PR do?

This PR updates our tests so that none of them use /tmp/ directly:

  • Anything that writes to a fixed path inside /tmp/ will be flaky in the face of concurrent tests: both will attempt to modify the same path.
  • Such tests do not clean up after themselves.
  • Under CI/CD tests are often supposed to use a different location that /tmp/ as a work area; access may be denied.
  • These tests don't work on Windows: /tmp/ does not exist

Instead tests should use the tmp_path pytest fixture to obtain a clean (and safe) temporary directory to use; it will be cleaned up when the test finishes.

To avoid confusion, unit tests that were using /tmp/ as an arbitrary path (but didn't actually access it) have been modified to use something else.

Caveats/things to watch out for when reviewing:

Some incidental changes include:

  • Type hints in a few places, and using Path instead of str.
  • An unused fixture was removed.
  • The profiler_extract_utils module is only needed during integration tests, so it was moved to location of the integration tests.

Tests

  • updated unit tests
  • updated integration tests

Tests shouldn't use fixed paths inside /tmp:
 - leads to flakiness during concurrent runs;
 - access isn't guaranteed;
 - it's not available on Windows.

The tmp_path fixture should be used instead.
@asnare asnare self-assigned this Dec 23, 2025
@asnare asnare requested a review from a team as a code owner December 23, 2025 16:03
@asnare asnare added tech debt design flaws and other cascading effects internal technical pr's not end user facing labels Dec 23, 2025
@github-actions
Copy link

github-actions bot commented Dec 23, 2025

✅ 51/51 passed, 4 flaky, 4m28s total

Flaky tests:

  • 🤪 test_transpiles_informatica_to_sparksql_non_interactive[False] (21.084s)
  • 🤪 test_transpile_teradata_sql_non_interactive[False] (22.346s)
  • 🤪 test_transpile_teradata_sql (9.375s)
  • 🤪 test_transpiles_informatica_to_sparksql_non_interactive[True] (3.888s)

Running from acceptance #3269

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.05%. Comparing base (34d089d) to head (0019bf7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2208      +/-   ##
==========================================
- Coverage   64.11%   64.05%   -0.06%     
==========================================
  Files         101      101              
  Lines        8675     8675              
  Branches      902      902              
==========================================
- Hits         5562     5557       -5     
- Misses       2941     2946       +5     
  Partials      172      172              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal technical pr's not end user facing tech debt design flaws and other cascading effects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants