From 70bc5aad30dca46e086f99f81c80f878d3f54bc6 Mon Sep 17 00:00:00 2001 From: Prudhvi Akhil Alahari Date: Mon, 24 Apr 2023 14:45:17 +0530 Subject: Fix after_open config and Snapshotting RefDir tests to work with bazel The changes I1db6fcf414b and I634b92877f added tests which were failing with errors [1] and [2] with "bazel test //...". This was not caught because we don't have CI running with bazel. Fix bazel build file so that these errors are no longer thrown when run with bazel. [1] error: cannot find symbol FileRepositoryBuilderTest [2] error: cannot find symbol RefDirectoryTest Bug: 581816 Signed-off-by: Prudhvi Akhil Alahari Change-Id: I1e57111662825f5f14f373bc4f8d24cce1fec0b8 --- org.eclipse.jgit.test/BUILD | 17 +++++++++++++++++ org.eclipse.jgit.test/tests.bzl | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index 6f6c88ce8d..e63c02c03c 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -51,6 +51,23 @@ tests(tests = glob( exclude = HELPERS + DATA + EXCLUDED, )) +# Non abstract base classes used for tests by other test classes +BASE = [ + PKG + "internal/storage/file/FileRepositoryBuilderTest.java", + PKG + "internal/storage/file/RefDirectoryTest.java", +] + +java_library( + name = "base", + testonly = 1, + srcs = BASE, + deps = [ + "//lib:junit", + "//org.eclipse.jgit:jgit", + "//org.eclipse.jgit.junit:junit", + ], +) + java_library( name = "helpers", testonly = 1, diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl index e201bdbcb3..170bf0c460 100644 --- a/org.eclipse.jgit.test/tests.bzl +++ b/org.eclipse.jgit.test/tests.bzl @@ -52,6 +52,12 @@ def tests(tests): "//lib:xz", "//org.eclipse.jgit.archive:jgit-archive", ] + if src.endswith("FileRepositoryBuilderAfterOpenConfigTest.java") or \ + src.endswith("RefDirectoryAfterOpenConfigTest.java") or \ + src.endswith("SnapshottingRefDirectoryTest.java"): + additional_deps = [ + ":base", + ] heap_size = "-Xmx256m" if src.endswith("HugeCommitMessageTest.java"): heap_size = "-Xmx512m" -- cgit v1.2.3