Skip to content

Flaky spec in initiatives_controller_spec.rb (initiatives) #9017

@andreslucena

Description

@andreslucena

Describe the bug
While running the test suite, there are some flaky test with the file ./spec/controllers/decidim/initiatives/initiatives_controller_spec.rb in decidim-initiatives module

To Reproduce
Steps to reproduce the behavior:

  1. Run multiple times the spec for this file
cd decidim-initiatives && for i in $(seq 1 200); do bundle exec rspec  ./spec/controllers/decidim/initiatives/initiatives_controller_spec.rb; done
  1. See error

Expected behavior
That this spec should run green all the time

Screenshots

image

Stacktrace

  1) Decidim::Initiatives::InitiativesController Edit initiative as promoter and update an initiative are allowed
     Failure/Error: expect(flash[:alert]).to be_nil

       expected: nil
            got: "An error has occurred"
     # ./spec/controllers/decidim/initiatives/initiatives_controller_spec.rb:115:in `block (4 levels) in <top (required)>'

Finished in 5 minutes 36 seconds (files took 9.37 seconds to load)
407 examples, 1 failure

Failed examples:

rspec ./spec/controllers/decidim/initiatives/initiatives_controller_spec.rb:109 # Decidim::Initiatives::InitiativesController Edit initiative as promoter and update an initiative are allowed

Randomized with seed 17129


Extra data (please complete the following information):

  • Decidim Version: 0.27.0.dev
  • Decidim installation: CI and local

Additional context

https://github.com/decidim/decidim/runs/5550406210?check_suite_focus=true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions