Browse Source

Fix running tests from bazel

The new dependency to mockito for JDKHttpConnectionTest wasn't added for
bazel test run.

Change-Id: Ie967b7152340a0b3e05cced7eadfd40af78d9995
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.2
Matthias Sohn 6 years ago
parent
commit
2532fa74c2
  1. 26
      WORKSPACE
  2. 12
      lib/BUILD
  3. 1
      org.eclipse.jgit.test/BUILD
  4. 4
      org.eclipse.jgit.test/tests.bzl

26
WORKSPACE

@ -130,6 +130,32 @@ maven_jar(
sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0",
)
maven_jar(
name = "mockito",
artifact = "org.mockito:mockito-core:2.13.0",
sha1 = "8e372943974e4a121fb8617baced8ebfe46d54f0",
)
BYTE_BUDDY_VERSION = "1.7.9"
maven_jar(
name = "byte_buddy",
artifact = "net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION,
sha1 = "51218a01a882c04d0aba8c028179cce488bbcb58",
)
maven_jar(
name = "byte_buddy_agent",
artifact = "net.bytebuddy:byte-buddy-agent:" + BYTE_BUDDY_VERSION,
sha1 = "a6c65f9da7f467ee1f02ff2841ffd3155aee2fc9",
)
maven_jar(
name = "objenesis",
artifact = "org.objenesis:objenesis:2.6",
sha1 = "639033469776fd37c08358c6b92a4761feb2af4b",
)
maven_jar(
name = "gson",
artifact = "com.google.code.gson:gson:2.8.2",

12
lib/BUILD

@ -158,6 +158,18 @@ java_library(
],
)
java_library(
name = "mockito",
testonly = 1,
visibility = ["//visibility:public"],
exports = [
"@mockito//jar",
"@byte_buddy//jar",
"@byte_buddy_agent//jar",
"@objenesis//jar",
],
)
java_library(
name = "servlet-api",
visibility = [

1
org.eclipse.jgit.test/BUILD

@ -50,6 +50,7 @@ java_library(
deps = [
"//lib:jsch",
"//lib:junit",
"//lib:mockito",
"//org.eclipse.jgit:jgit",
"//org.eclipse.jgit.junit:junit",
],

4
org.eclipse.jgit.test/tests.bzl

@ -49,6 +49,10 @@ def tests(tests):
"//lib:sshd-sftp",
":sshd-helpers",
]
if src.endswith("JDKHttpConnectionTest.java"):
additional_deps = [
"//lib:mockito",
]
heap_size = "-Xmx256m"
if src.endswith("HugeCommitMessageTest.java"):
heap_size = "-Xmx512m"

Loading…
Cancel
Save