0

I’m just starting out learning to code so I apologise if my question is a simple one, it’s doing my head in. I have 2 specs that are failing in travis-ci which are passing in my test environment. The error I’m getting is:

148.18s$ bundle exec rspec
Running via Spring preloader in process 15472
.............................Capybara starting Puma...
* Version 3.12.0 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://127.0.0.1:35193
F..F.............................................................

Failures:
1) Users can create new tickets with multiple attachment
Failure/Error: visit project_path(project)
Net::ReadTimeout:
Net::ReadTimeout
# ./spec/features/creating_tickets_spec.rb:12:in `block (2 levels) in <top (required)>'
2) Users can delete unwanted tags from a ticket successfully
Failure/Error: visit project_ticket_path(project, ticket)

Net::ReadTimeout:
Net::ReadTimeout
# ./spec/features/deleting_tags_spec.rb:16:in `block (2 levels) in <top (required)>'
Finished in 2 minutes 17.9 seconds (files took 9.62 seconds to load)
131 examples, 2 failures
Failed examples:
rspec ./spec/features/creating_tickets_spec.rb:45 # Users can create new tickets with multiple attachment
rspec ./spec/features/deleting_tags_spec.rb:15 # Users can delete unwanted tags from a ticket successfully
The command "bundle exec rspec" exited with 1.
Done. Your build exited with 1.

the visit xxx_path(xxx) line of code that appears to be failing exists in multiple specs in my project so I’m kind of at a loss as to what is going wrong. Please can you help me fix this issue so I can finally get travis-ci working for my project. Thankyou!!

My codebase is hosted on github here: https://github.com/mellansquare/rails-4-in-action-2

1 Answers1

0

It seems to me that your test requiring a graphical user interface on Travis CI, so try to add the following to your .travis.yml:

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start

MHL
  • 81
  • 6
  • This doesn't seem to have helped me with the Net ReadTimeout error. I'm trying the options in the link that Scott Bartell mentioned in his comment. – Melanie Packer Mar 28 '19 at 04:22