Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2021-06-15 15:03:02 -0400
committerThomas Wolf2021-06-15 15:17:29 -0400
commit0aa89983a83c8d744043601d6bfeb3d9bdedc25d (patch)
tree41f94b0ddbc8edb9c695f7fec345713f2edd8feb /org.eclipse.egit.github.core.tests/src/org/eclipse
parentd34b63998185ab279158e58f93d906a7c9109e0f (diff)
downloadegit-github-0aa89983a83c8d744043601d6bfeb3d9bdedc25d.tar.gz
egit-github-0aa89983a83c8d744043601d6bfeb3d9bdedc25d.tar.xz
egit-github-0aa89983a83c8d744043601d6bfeb3d9bdedc25d.zip
[releng] Force --release and use BREE to run testsstable-5.12
Make the EGit-Github build work if code is compiled with a Java > 1.8. This prepares for moving the BREE to Java 11: when we do that, we will need to be able to build nightly with and against Java 11, but the stable branch against Java 1.8. This requires a ~/.m2/toolchains.xml file defining at least a JavaSE-1.8 toolchain. The CI build pods do have such toolchain definitions. Change-Id: I82e9cb4c2518bc13906d44cc1ead2724f7130ffe Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.github.core.tests/src/org/eclipse')
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java1
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/BreeSmokeTest.java34
2 files changed, 35 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java
index 9d2a6923..b3f7a112 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AllHeadlessTests.java
@@ -25,6 +25,7 @@ import org.junit.runners.Suite.SuiteClasses;
@SuiteClasses({ ApplicationTest.class, //
AuthorizationTest.class, //
BlobTest.class, //
+ BreeSmokeTest.class, //
CollaboratorServiceTest.class, //
CommentTest.class, //
CommitCommentPayloadTest.class, //
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/BreeSmokeTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/BreeSmokeTest.java
new file mode 100644
index 00000000..ebf33574
--- /dev/null
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/BreeSmokeTest.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch>
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.egit.github.core.tests;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+
+import org.junit.Test;
+
+/**
+ * Simple test to guard against build setup errors such as --release not being
+ * effective.
+ */
+public class BreeSmokeTest {
+
+ @Test
+ public void testByteBuffer() {
+ // This test will fail if compiled against a Java 11 library without
+ // --release 8 and then run on a Java 8 JVM with Java 8 libraries
+ ByteBuffer buffer = ByteBuffer.allocate(10);
+ Buffer flipped = buffer.flip();
+ assertNotNull(flipped);
+ }
+}

Back to the top