Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !9846

Introduce a new middleware for the test environment that can block requests

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rémy Coutable requested to merge 28307-fix-sporadic-feature-spec-failures into master Mar 10, 2017
  • Overview 12
  • Commits 4
  • Pipelines 4
  • Changes 7

What does this MR do?

After digging into https://gitlab.com/gitlab-org/gitlab-ce/issues/28307#note_24958837, I thought there is probably a clean and robust solution to this issue other than tweaking assertions on a case-by-case basis...

And then I found http://www.salsify.com/blog/engineering/tearing-capybara-ajax-tests. I implemented what's described in the article and I've never experienced a PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_routes_on_source_type_and_source_id" error again!

Are there points in the code the reviewer needs to double check?

I don't there is any downside with this technique.

Closes #28307 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 28307-fix-sporadic-feature-spec-failures