summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-03-07 16:41:06 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2023-03-07 16:41:19 +0100
commit228e4de4841a694bf55ff38212822fca46b7b080 (patch)
treeb2e1c02a4f9a864cc9a47aba3ddad083218d3cb4
parent0687c73a12b5157c350de430f62ea8243d813e19 (diff)
parentc6b979444b671f013f630241f84fba7983b540b6 (diff)
downloadjgit-228e4de4841a694bf55ff38212822fca46b7b080.tar.gz
jgit-228e4de4841a694bf55ff38212822fca46b7b080.zip
Merge branch 'stable-6.5'
* stable-6.5: Rerun flaky tests 3 times Prepare 6.5.1-SNAPSHOT builds JGit v6.5.0.202303070854-r Ignore generated org.eclipse.jgit.benchmarks/dependency-reduced-pom.xml [sshd] Fix calculation of timeout in AbstractClientProxyConnector Silence API error raised for removed BranchRebaseMode#PRESERVE Change-Id: Ie615980c81371ee26b2395e67e026bbd17422fbd
-rw-r--r--.bazelrc1
-rw-r--r--.gitignore1
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java23
-rw-r--r--org.eclipse.jgit/.settings/.api_filters8
4 files changed, 20 insertions, 13 deletions
diff --git a/.bazelrc b/.bazelrc
index 8c32661215..e6c3dc6abf 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -30,6 +30,7 @@ build:remote17 --tool_java_runtime_version=remotejdk_17
test --build_tests_only
test --test_output=errors
+test --flaky_test_attempts=3
import %workspace%/tools/remote-bazelrc
diff --git a/.gitignore b/.gitignore
index 553ecac486..5306e41984 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/.project
+/org.eclipse.jgit.benchmarks/dependency-reduced-pom.xml
/target
infer-out
bazel-*
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
index a8e33af35e..a05d6415fa 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
@@ -27,8 +27,8 @@ import org.eclipse.jgit.internal.transport.sshd.JGitClientSession;
public abstract class AbstractClientProxyConnector
implements StatefulProxyConnector {
- private static final long DEFAULT_PROXY_TIMEOUT_MILLIS = TimeUnit.SECONDS
- .toMillis(30L);
+ private static final long DEFAULT_PROXY_TIMEOUT_NANOS = TimeUnit.SECONDS
+ .toNanos(30L);
/** Guards {@link #done} and {@link #bufferedCommands}. */
private final Object lock = new Object();
@@ -39,7 +39,7 @@ public abstract class AbstractClientProxyConnector
private AtomicReference<Runnable> unregister = new AtomicReference<>();
- private long remainingProxyProtocolTime = DEFAULT_PROXY_TIMEOUT_MILLIS;
+ private long remainingProxyProtocolTime = DEFAULT_PROXY_TIMEOUT_NANOS;
private long lastProxyOperationTime = 0L;
@@ -85,12 +85,12 @@ public abstract class AbstractClientProxyConnector
* to initialize for
*/
protected void init(ClientSession session) {
- remainingProxyProtocolTime = session.getLongProperty(
+ long millis = session.getLongProperty(
StatefulProxyConnector.TIMEOUT_PROPERTY,
- DEFAULT_PROXY_TIMEOUT_MILLIS);
- if (remainingProxyProtocolTime <= 0L) {
- remainingProxyProtocolTime = DEFAULT_PROXY_TIMEOUT_MILLIS;
- }
+ 0);
+ remainingProxyProtocolTime = (millis > 0)
+ ? TimeUnit.MILLISECONDS.toNanos(millis)
+ : DEFAULT_PROXY_TIMEOUT_NANOS;
if (session instanceof JGitClientSession) {
JGitClientSession s = (JGitClientSession) session;
unregister.set(() -> s.setProxyHandler(null));
@@ -115,12 +115,9 @@ public abstract class AbstractClientProxyConnector
if (last != 0L) {
long elapsed = now - last;
remaining -= elapsed;
- if (remaining < 0L) {
- remaining = 10L; // Give it grace period.
- }
+ remainingProxyProtocolTime = remaining;
}
- remainingProxyProtocolTime = remaining;
- return remaining;
+ return Math.max(remaining / 1_000_000L, 10L); // Give it grace period.
}
/**
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index e215f7aa3f..b00ad4b22f 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -50,6 +50,14 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/jgit/lib/BranchConfig.java" type="org.eclipse.jgit.lib.BranchConfig$BranchRebaseMode">
+ <filter id="372293724">
+ <message_arguments>
+ <message_argument value="org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode"/>
+ <message_argument value="PRESERVE"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/jgit/lib/ConfigConstants.java" type="org.eclipse.jgit.lib.ConfigConstants">
<filter id="1142947843">
<message_arguments>