Audit excluded tests on JRuby and address differences

Offen
#1,123 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
ruby
Bereich
backend

Rechercherichtung

Start by running the listed JRuby-excluded tests under JRuby and compare their behavior with the C extension; inspect the conditionals and omissions in test/json/json_generator_test.rb, test/json/json_minefield_parser_test.rb, test/json/json_parser_test.rb, and test/json/resumable_parser_test.rb. Use #1122 as the example of a latent bug. Done means fixing the applicable Java extension differences and restoring the corresponding tests, while identifying exclusions that remain valid.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Several tests still explicitly exclude JRuby and do not run against the Java extension. We should reexamine these and fix as many differences with the C extension as possible.

$ git grep -e "RUBY_ENGINE == [\"']jruby" test 
test/json/json_generator_test.rb:    if RUBY_ENGINE == "jruby"
test/json/json_minefield_parser_test.rb:  if RUBY_ENGINE == 'jruby'
test/json/json_parser_test.rb:    unless RUBY_ENGINE == 'jruby'
test/json/json_parser_test.rb:    omit "JRuby errors don't contain positions" if RUBY_ENGINE == "jruby"
test/json/json_parser_test.rb:    omit "JRuby errors don't contain positions" if RUBY_ENGINE == "jruby"
test/json/json_parser_test.rb:    omit "JRuby string decoding errors don't contain positions" if RUBY_ENGINE == "jruby"
test/json/resumable_parser_test.rb:    omit "JRuby not supported" if RUBY_ENGINE == "jruby"

Some of these may be valid but most involve changes made to the C extension that were never ported to the Java extension. That last one excludes all of the ResumableParser tests because that entire feature is missing from the Java extension.

See #1122 for one example of a latent bug hidden by these masks.

Vorherrschende Sprache
Ruby
Sterne
785
Forks
389
Ø Merge
6 Std. 32 Min.
Gemergte PRs (30 T.)
22

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ruby/json

Alle Issues in ruby/json

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.