From d935a986c219de6b3bd0bb5c496f4574c9fd8f72 Mon Sep 17 00:00:00 2001 From: be-marc Date: Thu, 2 Jul 2026 13:31:11 +0200 Subject: [PATCH] test: tolerate condition column in ArchiveAsync as.data.table test A failed task adds a "condition" column to the archive data, so the column-name check must ignore it to avoid spurious failures. Co-Authored-By: Claude Opus 4.8 --- tests/testthat/test_ArchiveAsync.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test_ArchiveAsync.R b/tests/testthat/test_ArchiveAsync.R index 21a06aef..f62b8f7d 100644 --- a/tests/testthat/test_ArchiveAsync.R +++ b/tests/testthat/test_ArchiveAsync.R @@ -123,7 +123,8 @@ test_that("as.data.table.ArchiveAsync works", { expect_data_table(data, min.rows = 5) cns = c("state", "x1", "x2", "y", "timestamp_xs", "worker_id", "timestamp_ys", "keys", "x_domain_x1", "x_domain_x2") - expect_names(colnames(data), identical.to = cns) + # a failed task adds a "condition" column + expect_names(setdiff(colnames(data), "condition"), identical.to = cns) data = as.data.table(instance$archive, unnest = NULL) expect_list(data$x_domain)