ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
360 stars 86 forks source link

Adjust wait time in Lightspeed test with mock server #1325

Closed TamiTakamiya closed 4 months ago

TamiTakamiya commented 4 months ago

This is for the test failure on a Lightspeed inline suggestion feedback test case

  1 failing
  1) END-TO-END TEST SUITE FOR REDHAT.ANSIBLE EXTENSION
       TEST EXTENSION IN LOCAL ENVIRONMENT
         TEST ANSIBLE LIGHTSPEED
           Test Ansible Lightspeed inline completion suggestions with keeping typing
             Should not return an inline feedback 'Create a file foo.txt':

      AssertionError: expected +0 to equal 1
      + expected - actual

      -0
      +1

    at Context.<anonymous> (out/client/test/testScripts/lightspeed/testLightspeed.test.js:264:35)

[mochawesome] Report JSON saved to /home/runner/work/vscode-ansible/vscode-ansible/out/e2eTestReport/e2e_test_report.json

[mochawesome] Report HTML saved to /home/runner/work/vscode-ansible/vscode-ansible/out/e2eTestReport/e2e_test_report.html

Error: 1 tests failed.
    at /home/runner/work/vscode-ansible/vscode-ansible/out/client/test/index.js:97:23
    at /home/runner/work/vscode-ansible/vscode-ansible/node_modules/mochawesome/src/mochawesome.js:49:15

This test case does not fail in the local environment, but it pretty frequently fails in the CI environment. This PR is for doubling the wait time both in test case and the "mock" lightspeed API so that the test case runs more reliably in the CI environment that is considered to be slower than the local development environment.