Closed westonganger closed 5 months ago
I just pushed a cleanup to the test directory, running
rake test
Should run all the tests
Please note that the first error you get means you are running an older version of sqlite3, please install a newer version if possible (yes, the error message needs to be improved)
SQLite 3.43 is the required version
@oldmoe seems better. But we also need to add sequel
to the gemspec as a development dependency
@oldmoe should all the tests be passing so far?
test/test_ar_search.rb
(RuntimeError: index does not exist and no schema was supplied
)test/test_litejob.rb
and test/test_jobqueue.rb
If we have existing failing specs than it would be good to mark them as skipped/pending until they are updated to be passing. If we have them skipped, then we can slowly work on fixing these while maintaining a green build.
@westonganger you aren't alone.
I also had to add sequel
as a development dependency to get the test suite to run rake test
.
I'm only getting failed tests in test_jobqueue
. At this point I'm not exactly sure why the tests are failing but I'm pretty sure it's a timing problem as the tests have a number of hard coded sleep calls. If nothing else those sleeps are the cause of the stalled tests. When I re-run the test suite I get different failing tests though always 3 and always only in test_jobqueue
. Sometimes the test suite doesn't complete and hangs though and I have to CTRL+C to exit.
When I test just that specific file using rake test TEST=test/test_jobqueue.rb
I get zero or one failing test which makes me more convinced it's a timing related issue.
I thought I'd share my findings here while I continue to dig deeper in case other people are having similar problems.
I'm running the tests on a M1 Mac mini with Ruby 3.2.2.
I will fix the sequel dependency, sadly, the current implementation for litejob* is flaky, it passes at times and fails at others. I need to implement better time management in litequeue and the tests to fix that, hopefully will get to that soon.
As for the schema error in test_ar_search, this could be due to the way AR loads the dependencies, something I have been struggling to fix, but a workaround would be to remove the existing gem and install one from the local gemspec,
I dont seem to be able to run the test suite for this project.
active_record
so I addgem "rails"
to the Gemfile to get past thistest/test_ar_search.rb
(unrecognized option: "contentless_delete" (SQLite3::SQLException)
)test/test_ar_search.rb
then I receive more errors intest/test_litejob.rb
(cannot load such file -- ../lib/litestack/litejobqueue
)Would like to be able to just type
bundle exec rake test
and have the test suite just work. However I cant help out with that until I get some info for steps here.Can you please provide some instructions on how to run the test suite?