Skip to content

Conversation

ndeneh93
Copy link

What is the purpose of this PR
Adds a GitHub Actions workflow to confirm the flakiness of cz.habarta.typescript.generator.TaggedUnionsTest.testTaggedUnionsWithInterfaces in the typescript-generator project, as part of the IDoFT flaky test task (Part Three).

Why the test fails
The test likely relies on non-deterministic iteration order (e.g., HashMap keys) in generated TypeScript output, causing intermittent failures when shuffled by NonDex.

How to reproduce the test failure
Run the GitHub Actions workflow in this PR or locally:
mvn -pl typescript-generator-core edu.illinois:nondex-maven-plugin:2.1.1:nondex -Dtest=cz.habarta.typescript.generator.TaggedUnionsTest#testTaggedUnionsWithInterfaces -DnondexRuns=50
The test fails intermittently due to order-dependent assertions.

Expected results
The normal test run passes consistently, while the NonDex run fails intermittently, confirming the test is flaky.

Actual results
In the CI run ([link to Actions run, e.g., https://github.com/ndeneh93/typescript-generator/actions/runs/XXXXX]), the normal test passed, and the NonDex test failed X/50 runs, confirming flakiness.

Description of changes
Added .github/workflows/flaky-test.yml to run the test normally and with NonDex, verifying its flaky behavior in CI.

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        java-version: '17'
    - name: Install Maven
      run: sudo apt-get install maven -y
    - name: Run flaky test with NonDex
      run: mvn edu.illinois:nondex-maven-plugin:nondex -Dtest=typescript-generator-core.MyFlakyTest#shouldGenerateCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant