Skip to content

test: Fix test-bind-nonfinite.R on R < 4.3 and on servers without local infile - #648

Merged
krlmlr merged 2 commits into
mainfrom
claude/as-date-origin
Nov 29, 2026
Merged

krlmlr merged 2 commits into
mainfrom
claude/as-date-origin

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #647. Test-only changes to tests/testthat/test-bind-nonfinite.R (from #623 and #636).

  • as.Date() on numbers without origin fails on R < 4.3, where origin has no default, so seven tests errored in the R 4.2 job. All ten such calls now pass origin = "1970-01-01", which gives identical results on R ≥ 4.3, Inf, NA and NaN included.
  • The LOAD DATA LOCAL INFILE tests errored on the MySQL-server job with "Loading local data is disabled", because the server there has local_infile off. infile_connection() now also skips when SHOW VARIABLES LIKE 'local_infile' is OFF, as test-dbWriteTable.R already does.

Tests: the file parses, and a clean review checked the as.Date() results against the old behavior on R 4.5. The local database server is down, so the suite runs in CI only. I dispatched the full matrix, which includes the R 4.2 and MySQL-server jobs.

Accepted limitations

https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ


Generated by Claude Code

@krlmlr krlmlr changed the title test: Pass an origin to as.Date() for R < 4.3 test: Fix test-bind-nonfinite.R on R < 4.3 and on servers without local infile Nov 29, 2026

krlmlr commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

Accepted limitations

The clean review found nothing above Low for the as.Date() change. It also confirmed that no other test file calls as.Date() on numbers. Its one Low, a line too long after the change, is fixed in f6876c4.

  • tests/testthat/test-bind-nonfinite.R: with local_infile off on the server, the infile tests that only check the error raised before any data is sent are skipped too, though they would pass. Relevance: low. Reviewer confidence: high.

Generated by Claude Code

krlmlr commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

The red "macos-latest (release) mysql_config" job on f6876c4 (job) is #651, not this PR. The server stops accepting connections during the #621 interrupt test in test-dbDisconnect.R, and every later connection is refused ([ FAIL 11 | SKIP 34 | PASS 203 ], with the skips starting at test-dbDisconnect.R:143). main fails the same way intermittently. A reproducer for #651 is in #652.


Generated by Claude Code

krlmlr commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

Full-matrix result for f6876c4 (run 46293140156), read from the job logs:

  • The R 4.2 job, which this PR fixes, has [ FAIL 0 | WARN 2 | SKIP 9 | PASS 9184 ].
  • The MySQL server job has [ FAIL 0 | WARN 2 | SKIP 32 | PASS 9112 ].
  • Both MariaDB server jobs, and the Linux, macOS and Windows jobs that finished, have FAIL 0.

Two failures are not this PR's:


Generated by Claude Code

@krlmlr
krlmlr merged commit df69642 into main Nov 29, 2026
33 of 35 checks passed
@krlmlr
krlmlr deleted the claude/as-date-origin branch November 29, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test-bind-nonfinite.R fails on R < 4.3 (as.Date() needs origin) and on MySQL servers (local infile disabled)

2 participants