Skip to content

32 errors returns a success error code #333

@schneems

Description

@schneems

Expected

If my test suite says it had 32 errors, it will fail

Actual

$ bundle exec rspec-queue --max-requeues=3 --timeout 180 --queue redis://localhost:6379/0 --format documentation --build lol --worker lol; echo Done $?

...

While loading ./spec/unit/bash_functions_spec.rb a `raise SyntaxError` occurred, RSpec will now quit.
Failure/Error: require 'language_pack'

SyntaxError:
  --> /Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/language_pack.rb
  expected a newline or semicolon after the statementcannot parse the expressionexpected an expression after `,`unexpected write target
     8  module LanguagePack
    22    def self.detect(app_path:, cache_path:, gemfile_lock: )
    27      if pack_klass
    28        pack_klass.new(
  > 29          app_path: app_path,
  > 30          cache_path: cache_path
  > 31          gemfile_lock: gemfile_lock
    32        )
    33      else
    36    end
    37  end

  /Users/rschneeman/Documents/projects/work/heroku-buildpack-ruby/lib/language_pack.rb:31: syntax error, unexpected local variable or method, expecting ')' (SyntaxError)
          gemfile_lock: gemfile_lock
          ^~~~~~~~~~~~
# ./spec/spec_helper.rb:7:in `<top (required)>'
# ./spec/unit/bash_functions_spec.rb:1:in `<top (required)>'
# /Users/rschneeman/.gem/ruby/3.3.8/gems/ci-queue-0.67.0/lib/rspec/queue.rb:361:in `setup'

Finished in 0.00064 seconds (files took 0.28631 seconds to load)
0 examples, 0 failures, 32 errors occurred outside of examples

Done 0

Repro

I pushed my code here https://github.com/heroku/heroku-buildpack-ruby/tree/schneems/ci-queue-repro-2025-may-22. There's a syntax error in it so all tests should fail:

$ git clone https://github.com/heroku/heroku-buildpack-ruby
$ cd heroku-buildpack-ruby
$ git checkout ci-queue-repro-2025-may-22
$ bundle exec rspec-queue --max-requeues=3 --timeout 180 --queue redis://localhost:6379/0 --format documentation --build lol --worker lol; echo Done $?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions