Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix random CI failures #1495

Merged
merged 1 commit into from Dec 27, 2019

Commits on Dec 25, 2019

  1. Attempt to fix random CI failures

    We get frequent random CI failures with errors on feature specs, like
    the following:
    
    ```
    Failures:
    
      1) Search admin searches with an unknown filter
         Failure/Error: DatabaseCleaner.clean
    
         ActiveRecord::StatementInvalid:
           PG::TRDeadlockDetected: ERROR:  deadlock detected
           DETAIL:  Process 12270 waits for AccessExclusiveLock on relation 16412 of database 16386; blocked by process 12192.
           Process 12192 waits for AccessShareLock on relation 16400 of database 16386; blocked by process 12270.
           HINT:  See server log for query details.
           : TRUNCATE TABLE "public"."blog_posts", "public"."series", "public"."countries", "public"."log_entries", "public"."payments", "public"."product_meta_tags", "public"."customers", "public"."products", "public"."orders", "public"."line_items" RESTART IDENTITY CASCADE;
         # ./spec/support/database_cleaner.rb:19:in `block (2 levels) in <top (required)>'
         # ------------------
         # --- Caused by: ---
         # PG::TRDeadlockDetected:
         #   ERROR:  deadlock detected
         #   DETAIL:  Process 12270 waits for AccessExclusiveLock on relation 16412 of database 16386; blocked by process 12192.
         #   Process 12192 waits for AccessShareLock on relation 16400 of database 16386; blocked by process 12270.
         #   HINT:  See server log for query details.
         #   ./spec/support/database_cleaner.rb:19:in `block (2 levels) in <top (required)>'
    
    Finished in 29.41 seconds (files took 3.65 seconds to load)
    418 examples, 1 failure
    ```
    
    This may or may not be related to `DatabaseCleaner`. As an attempt to
    fix it, I'm trying this configuration, copied straight from their
    documentation at https://github.com/DatabaseCleaner/database_cleaner/blob/v1.7.0/README.markdown
    pablobm committed Dec 25, 2019
    Copy the full SHA
    7855f74 View commit details
    Browse the repository at this point in the history