Skip to content

test:regression:search fails

Created by: uwedeportivo

  • 3.13
  • local docker

Steps to reproduce:

  1. IMAGE=sourcegraph/server:3.13.0-rc.1 ./dev/run-server-image.sh
  2. Configure external URL, add license, create sudo token
  3. source these env vars in your shell
export SOURCEGRAPH_BASE_URL='http://localhost:7080'
export SOURCEGRAPH_SUDO_TOKEN=xxxxxxx your token from above xxxxx
export SOURCEGRAPH_SUDO_USER=your instance user

you need a bunch more, they are in our 1password/shared/test:regression e2e environment variables:

https://team-sourcegraph.1password.com/vaults/dnrhbauihkhjs5ag6vszsme45a/allitems/gm5dfflq6sfclmotneuayfdj5q
  1. cd web
  2. yarn run test:regression:search

Expected behavior:

test suite passess

Actual behavior:

46 tests pass, 4 fail

~/work/src/github.com/sourcegraph/sourcegraph/web(3.13*) » yarn run test:regression:search                                                                                                                                                                               uwe@maxx
yarn run v1.21.1
$ mocha ./src/regression/search.test.ts


  Search regression test suite
    Search over a dozen repositories
      ✓ Global text search with 0 results. (2213ms)
      ✓ Global text search with double-quoted string constant ("error type:") with a few results.
      ✓ Global text search excluding repository ("error type:") with a few results.
      ✓ Global text search (error) with many results.
      ✓ Global text search (error count:>1000), expect many results. (4099ms)
      ✓ Global text search (repohasfile:copying), expect many results.
      ✓ Global text search (repohascommitafter:"5 years ago") (1590ms)
      ✓ Global text search for something with more than 1000 results and use "count:1000". (4966ms)
      ✓ Global text search for a regular expression without indexed search: (index:no ^func.*$), expect many results. (2958ms)
      ✓ Global text search for a regular expression with only indexed search: (index:only ^func.*$), expect many results. (1890ms)
      ✓ Search for a repository by name. (1108ms)
      1) Single repository, case-sensitive search.
📸  Saved screenshot of failure to ../puppeteer/Search_regression_test_suite_Search_over_a_dozen_repositories_Single_repository__case_sensitive_search_.png
      ✓ Global text search, fork:only, few results
      ✓ Global text search, fork:only, 1 result
      ✓ Global text search, fork:no, 0 results
      2) Text search non-master branch, large repository, many results
📸  Saved screenshot of failure to ../puppeteer/Search_regression_test_suite_Search_over_a_dozen_repositories_Text_search_non_master_branch__large_repository__many_results.png
      ✓ Global text search filtering by language (2350ms)
      ✓ Global search for a filename with 0 results
      3) Global search for a filename with a few results
📸  Saved screenshot of failure to ../puppeteer/Search_regression_test_suite_Search_over_a_dozen_repositories_Global_search_for_a_filename_with_a_few_results.png
      ✓ Global search for a filename with many results
      ✓ Global symbol search with many results
      ✓ Global symbol search with 0 results
      ✓ Global symbol search ("type:symbol ^newroute count:100") with a few results (1046ms)
      ✓ Indexed multiline search, many results
      ✓ Non-indexed multiline search, many results (1107ms)
      ✓ Indexed multiline search, 0 results
      ✓ Non-indexed multiline search, 0 results
      ✓ Indexed-only structural search, one or more results (2021ms)
      ✓ Commit search, nonzero result (1295ms)
      ✓ Diff search, nonzero result
      ✓ Search timeout
      ✓ Search repo group
      ✓ Search suggestions (3035ms)
      ✓ Search filters (1097ms)
    Interactive search mode
      ✓ Toggling between plain and interactive mode shows correct elements
      ✓ Clicking repo filter button displays selected filters row and repo filter input
      4) Conducting a plain search query correctly returns results
📸  Saved screenshot of failure to ../puppeteer/Search_regression_test_suite_Interactive_search_mode_Conducting_a_plain_search_query_correctly_returns_results.png
      ✓ Adding a repo filter correctly returns results
      ✓ Adding a term to query input correctly returns results
      ✓ Adding a file filter to query correctly returns results
      ✓ Adding a language filter from the dropdown correctly returns results
      ✓ Filters are properly parsed and displayed in the selected filters row
      ✓ Landing on search results page parses query filters properly
      ✓ Going to search homepage from search results page clears all filters
      ✓ Querying from a repository tree page produces correct query and filter values (1230ms)
      ✓ Toggling from interactive to plain text mode produces correct query
      ✓ Toggling from plain text to interactive mode correctly identifies filters
      ✓ Filter input suggestions
      ✓ Editing text filters
      ✓ Adding and editing finite filters


  46 passing (1m)
  4 failing

  1) Search regression test suite
       Search over a dozen repositories
         Single repository, case-sensitive search.:
     TimeoutError: waiting for function failed: timeout 30000ms exceeded
      at new WaitTask (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/DOMWorld.js:549:28)
      at DOMWorld.waitForFunction (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/DOMWorld.js:454:12)
      at Frame.waitForFunction (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:657:28)
      at Page.waitForFunction (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/Page.js:1144:29)
      at Context.<anonymous> (src/regression/search.test.ts:271:31)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)

  2) Search regression test suite
       Search over a dozen repositories
         Text search non-master branch, large repository, many results:
     Error: net::ERR_ABORTED at http://localhost:7080/search?q=repo:%5Egithub%5C.com/facebook/react%24%400.3-stable+"var+ExecutionEnvironment+%3D+require%28%27ExecutionEnvironment%27%29%3B"
      at navigate (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:120:37)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at FrameManager.navigateFrame (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:94:17)
      at Frame.goto (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:406:12)
      at Page.goto (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/Page.js:675:12)
      at Context.<anonymous> (src/regression/search.test.ts:287:13)
    -- ASYNC --
      at Frame.<anonymous> (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/helper.js:111:15)
      at Page.goto (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/Page.js:675:49)
      at Page.<anonymous> (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/helper.js:112:23)
      at Context.<anonymous> (src/regression/search.test.ts:287:31)
      at processImmediate (internal/timers.js:439:21)

  3) Search regression test suite
       Search over a dozen repositories
         Global search for a filename with a few results:
     Error: net::ERR_ABORTED at http://localhost:7080/search?q=file:router.go
      at navigate (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:120:37)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at FrameManager.navigateFrame (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:94:17)
      at Frame.goto (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/FrameManager.js:406:12)
      at Page.goto (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/Page.js:675:12)
      at Context.<anonymous> (src/regression/search.test.ts:318:13)
    -- ASYNC --
      at Frame.<anonymous> (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/helper.js:111:15)
      at Page.goto (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/Page.js:675:49)
      at Page.<anonymous> (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/helper.js:112:23)
      at Context.<anonymous> (src/regression/search.test.ts:318:31)
      at processImmediate (internal/timers.js:439:21)

  4) Search regression test suite
       Interactive search mode
         Conducting a plain search query correctly returns results:
     Error: Node is either not visible or not an HTMLElement
      at ElementHandle._clickablePoint (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/JSHandle.js:217:13)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at ElementHandle.click (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/JSHandle.js:283:20)
      at DOMWorld.click (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/DOMWorld.js:367:5)
      at Context.<anonymous> (src/regression/search.test.ts:613:13)
    -- ASYNC --
      at ElementHandle.<anonymous> (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/helper.js:111:15)
      at DOMWorld.click (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/DOMWorld.js:367:18)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at Context.<anonymous> (src/regression/search.test.ts:613:13)
    -- ASYNC --
      at Frame.<anonymous> (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/helper.js:111:15)
      at Page.click (/Users/uwe/work/src/github.com/sourcegraph/sourcegraph/node_modules/puppeteer/lib/Page.js:1067:29)
      at Context.<anonymous> (src/regression/search.test.ts:613:31)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)