[FOLIO-1215] Make codex-search test less flaky Created: 18/Apr/18  Updated: 12/Nov/18  Resolved: 02/May/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: charles Assignee: charles
Resolution: Done Votes: 0
Labels: ci, sprint36, sprint37
Remaining Estimate: Not Specified
Time Spent: 2 hours, 15 minutes
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-1113 Write a test for Codex Search Closed
Sprint:

 Description   

The codex-search test seems to fail intermittently, but can't replicate the failures in real life.

Niels Erik Nielsen : The test is located in the ui-testing repo as test/codex-search.js, if your interested.



 Comments   
Comment by Niels Erik Nielsen [ 18/Apr/18 ]

Right.
Installed latest ui-testing
Installed latest folio-testing-platform.
Upgraded to latest folio-testing-backend box

Ran test/codex-search from local ui-testing
against folio-testing.aws.indexdata.com - PASSED
against folio-snapshot-stable.aws.indexdata.com - PASSED
against local blackbox - FAILED (title not found, so that's that)

So that doesn't really help explaining why it would fail in Jenkins I guess.

~/folio/ui-testing$ FOLIO_UI_DEBUG=1 FOLIO_UI_URL=http://localhost:3000  yarn test-codexsearch  
yarn test-codexsearch v1.0.1
$ ./node_modules/.bin/mocha test/codex-search.js


  Load test-codexsearch
    Login > Codex Search > Confirm Results > Reset Search > Confirm Reset > Logout

      ✓ should login as diku_admin/admin (22756ms)
      1) should open codex search and execute search
      ✓ should reset search (81ms)
      ✓ should confirm reset search (239ms)
      ✓ should logout (1461ms)


  4 passing (57s)
  1 failing

  1) Load test-codexsearch Login > Codex Search > Confirm Results > Reset Search > Confirm Reset > Logout
 should open codex search and execute search:
     Error: .wait() timed out after 30000msec
      at Timeout._onTimeout (node_modules/nightmare/lib/actions.js:453:10)



error Command failed with exit code 1.


~/folio/ui-testing$ FOLIO_UI_DEBUG=1 FOLIO_UI_LOGIN_WAIT=10000 FOLIO_UI_URL=http://folio-testing.aws.indexdata.com  yarn test-codexsearch  
yarn test-codexsearch v1.0.1
$ ./node_modules/.bin/mocha test/codex-search.js


  Load test-codexsearch
    Login > Codex Search > Confirm Results > Reset Search > Confirm Reset > Logout

      ✓ should login as diku_admin/admin (18569ms)
      ✓ should open codex search and execute search (4090ms)
      ✓ should reset search (180ms)
      ✓ should confirm reset search (243ms)
      ✓ should logout (1503ms)


  5 passing (25s)

Done in 24.93s.

~/folio/ui-testing$ FOLIO_UI_DEBUG=1 FOLIO_UI_LOGIN_WAIT=10000 FOLIO_UI_URL=http://folio-snapshot-stable.aws.indexdata.com  yarn test-codexsearch  
yarn test-codexsearch v1.0.1
$ ./node_modules/.bin/mocha test/codex-search.js


  Load test-codexsearch
    Login > Codex Search > Confirm Results > Reset Search > Confirm Reset > Logout

      ✓ should login as diku_admin/admin (8880ms)
      ✓ should open codex search and execute search (3713ms)
      ✓ should reset search (184ms)
      ✓ should confirm reset search (243ms)
      ✓ should logout (1490ms)


  5 passing (15s)

Done in 14.85s.

Comment by charles [ 18/Apr/18 ]

I updated the test to click the "Local" filter before executing the test. I think this will make things less flakey, since we really can't depend on the KB to be very reliable.

Generated at Thu Feb 08 23:11:40 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.