-
Notifications
You must be signed in to change notification settings - Fork 129
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
Skip jr_jackson test unless jruby #213
Conversation
…serialization adapter by default since it's legacy.
@djberg96 TBH I think this is redundancy: I think you have to decide on one and only one way to split between JRuby and Ruby impl. Historically it has been done with the For a dev of the gem, it is then just a matter of setting Same goes with skipping |
@BuonOmo This was just a quick and dirty fix, I was only trying to stay within the framework that was already laid out. If it were up to me, this would all be refactored and handled with |
Got you, but I still think there is no urge in doing this refactoring... |
@BuonOmo I'm afraid I don't agree, we should be able to run the tests locally and pass. Case in point, I currently see this locally when I run
If I comment out the
I'm not even sure what's causing this yet, but I think it's a good reason to clean this stuff up. |
This is a bug in For the other ones, you just have to set the ENV variable locally ( So worst case scenario I would set this in the Have you seen the latest changes I made in the github-action PR ? Tests are basically passing, and I tried it locally as well :) So if you really want a change, I'd advocate for this: diff --git a/Rakefile b/Rakefile
index 9af21d7..dbb9ecd 100644
--- a/Rakefile
+++ b/Rakefile
@@ -16,6 +16,10 @@ namespace :adapters do
end
end
+# pure_json has a problem parsing time objects (see https://github.com/flori/json/issues/573)
+# jr_jackson and nsjsonserialization are outdated.
+ENV['SKIP_ADAPTERS'] = ENV.fetch('SKIP_ADAPTERS', 'json_pure,jr_jackson,nsjsonserialization')
+
task :spec => %w[
base_spec
adapters:oj
Or updating the folder below and removing the skipping part in tests. The point still being avoiding spec mess where a user can never know what is running, and why. And centralize this behaviour as much as possible. |
@BuonOmo Nice catch on the pure_json bug, wonder how long that's been out there. |
I’ll weigh in here:
I can think of a few solutions that would satisfy both of these conditions but I'm open to others. One option would be to make adapters opt-in instead of opt-out. Then we could set up a CI matrix where, for example, |
@sferik I think you're wanting a proper spec_helper.rb with filters then. BTW, does jrjackson only work with JRuby, or will it work with any Java-based implementation, e.g. TruffleRuby? |
Closing in favor of #215 |
I noticed that if I ran
rake
locally the jr_jackson specs would fail because I wasn't running JRuby. This PR just modifies it to skip the specs unless it's JRuby, which is already done elsewhere within the specs.There's also a whitespace trim.
Edit: I'm also skipping nsjsonserialization by default in the spec helper because, as per your own comments, it's a legacy parser of some sort. I am not even sure what it's for, as I could not find an "ok_json" gem.