mirror of https://github.com/etcd-io/jetcd.git
Compare commits
No commits in common. "main" and "jetcd-0.8.6-alpha" have entirely different histories.
main
...
jetcd-0.8.
|
@ -42,8 +42,8 @@ jobs:
|
||||||
- 17
|
- 17
|
||||||
- 21
|
- 21
|
||||||
etcd:
|
etcd:
|
||||||
- quay.io/coreos/etcd:v3.5.21
|
- quay.io/coreos/etcd:v3.5.14
|
||||||
- quay.io/coreos/etcd:v3.6.0
|
- quay.io/coreos/etcd:v3.4.33
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
javaVersion: "${{ matrix.java-version }}"
|
javaVersion: "${{ matrix.java-version }}"
|
||||||
|
|
|
@ -43,8 +43,8 @@ jobs:
|
||||||
- 17
|
- 17
|
||||||
- 21
|
- 21
|
||||||
etcd:
|
etcd:
|
||||||
- quay.io/coreos/etcd:v3.5.21
|
- quay.io/coreos/etcd:v3.5.14
|
||||||
- quay.io/coreos/etcd:v3.6.0
|
- quay.io/coreos/etcd:v3.4.33
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
javaVersion: "${{ matrix.java-version }}"
|
javaVersion: "${{ matrix.java-version }}"
|
||||||
|
|
3
OWNERS
3
OWNERS
|
@ -3,4 +3,5 @@
|
||||||
approvers:
|
approvers:
|
||||||
- fanminshi # Fanmin Shi <fanmin.shi@coreos.com>
|
- fanminshi # Fanmin Shi <fanmin.shi@coreos.com>
|
||||||
- lburgazzoli # Luca Burgazzoli <lburgazzoli@gmail.com>
|
- lburgazzoli # Luca Burgazzoli <lburgazzoli@gmail.com>
|
||||||
- vorburger # Michael Vorburger <mike@vorburger.ch>
|
- xiang90 # Xiang Li <xiang.li@coreos.com>
|
||||||
|
- heyitsanthony # Anthony Romano <anthony.romano@coreos.com>
|
||||||
|
|
|
@ -111,7 +111,7 @@ The project is tested against a three node `etcd` setup started with the Launche
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ ./gradlew test
|
$ ./gradlew test
|
||||||
```
|
````
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
|
|
@ -76,13 +76,6 @@ subprojects {
|
||||||
maxFailures = 5
|
maxFailures = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testing {
|
|
||||||
suites {
|
|
||||||
test {
|
|
||||||
useJUnitJupiter()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testlogger {
|
testlogger {
|
||||||
theme 'mocha-parallel'
|
theme 'mocha-parallel'
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
[versions]
|
[versions]
|
||||||
grpc = "1.74.0"
|
grpc = "1.70.0"
|
||||||
log4j = "2.25.1"
|
log4j = "2.24.3"
|
||||||
mockito = "5.18.0"
|
mockito = "5.15.2"
|
||||||
slf4j = "2.0.17"
|
slf4j = "2.0.17"
|
||||||
guava = "33.4.8-jre"
|
guava = "33.4.0-jre"
|
||||||
assertj = "3.27.3"
|
assertj = "3.27.3"
|
||||||
junit = "5.13.4"
|
junit = "5.11.4"
|
||||||
testcontainers = "1.21.3"
|
testcontainers = "1.20.5"
|
||||||
protoc = "3.25.1"
|
protoc = "3.25.1"
|
||||||
failsafe = "3.3.2"
|
failsafe = "3.3.2"
|
||||||
awaitility = "4.3.0"
|
awaitility = "4.3.0"
|
||||||
commonsIo = "2.20.0"
|
commonsIo = "2.18.0"
|
||||||
commonCompress = "1.28.0"
|
commonCompress = "1.27.1"
|
||||||
autoService = "1.1.1"
|
autoService = "1.1.1"
|
||||||
errorprone = "2.30.0"
|
errorprone = "2.30.0"
|
||||||
vertx = "5.0.1"
|
vertx = "4.5.13"
|
||||||
picocli = "4.7.7"
|
picocli = "4.7.6"
|
||||||
restAssured = "5.5.5"
|
restAssured = "5.5.1"
|
||||||
javaxAnnotation = "1.3.2"
|
javaxAnnotation = "1.3.2"
|
||||||
|
|
||||||
versionsPlugin = "0.52.0"
|
versionsPlugin = "0.52.0"
|
||||||
|
@ -24,7 +24,7 @@ errorPronePlugin = "4.0.1"
|
||||||
spotlessPlugin = "6.25.0"
|
spotlessPlugin = "6.25.0"
|
||||||
shadowPlugin = "8.1.1"
|
shadowPlugin = "8.1.1"
|
||||||
testLoggerPlugin = "4.0.0"
|
testLoggerPlugin = "4.0.0"
|
||||||
protobufPlugin = "0.9.5"
|
protobufPlugin = "0.9.4"
|
||||||
nexusPublishPlugin = "2.0.0"
|
nexusPublishPlugin = "2.0.0"
|
||||||
axionReleasePlugin = "1.18.17"
|
axionReleasePlugin = "1.18.17"
|
||||||
testRetryPlugin = "1.6.2"
|
testRetryPlugin = "1.6.2"
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
|
@ -114,7 +114,7 @@ case "$( uname )" in #(
|
||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH="\\\"\\\""
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
|
@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|
|
@ -70,11 +70,11 @@ goto fail
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
|
@ -37,7 +37,6 @@ import io.grpc.Metadata;
|
||||||
import io.grpc.netty.GrpcSslContexts;
|
import io.grpc.netty.GrpcSslContexts;
|
||||||
import io.netty.handler.ssl.SslContext;
|
import io.netty.handler.ssl.SslContext;
|
||||||
import io.netty.handler.ssl.SslContextBuilder;
|
import io.netty.handler.ssl.SslContextBuilder;
|
||||||
import io.vertx.core.Vertx;
|
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
|
|
||||||
|
@ -69,7 +68,6 @@ public final class ClientBuilder implements Cloneable {
|
||||||
private Duration retryMaxDuration;
|
private Duration retryMaxDuration;
|
||||||
private Duration connectTimeout;
|
private Duration connectTimeout;
|
||||||
private boolean waitForReady = true;
|
private boolean waitForReady = true;
|
||||||
private Vertx vertx;
|
|
||||||
|
|
||||||
ClientBuilder() {
|
ClientBuilder() {
|
||||||
}
|
}
|
||||||
|
@ -709,30 +707,6 @@ public final class ClientBuilder implements Cloneable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the Vertx instance.
|
|
||||||
*
|
|
||||||
* @return the vertx instance.
|
|
||||||
*/
|
|
||||||
public Vertx vertx() {
|
|
||||||
return vertx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* configure Vertx instance.
|
|
||||||
*
|
|
||||||
* @param vertx Vertx instance to use.
|
|
||||||
* @return this builder to train
|
|
||||||
* @throws IllegalArgumentException if vertx is null
|
|
||||||
*/
|
|
||||||
public ClientBuilder vertx(Vertx vertx) {
|
|
||||||
Preconditions.checkArgument(vertx != null, "vertx can't be null");
|
|
||||||
|
|
||||||
this.vertx = vertx;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* build a new Client.
|
* build a new Client.
|
||||||
*
|
*
|
||||||
|
|
|
@ -61,10 +61,6 @@ final class ClientConnectionManager {
|
||||||
} else {
|
} else {
|
||||||
this.executorService = builder.executorService();
|
this.executorService = builder.executorService();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (builder.vertx() != null) {
|
|
||||||
this.vertx = builder.vertx();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ManagedChannel getChannel() {
|
ManagedChannel getChannel() {
|
||||||
|
|
|
@ -135,7 +135,7 @@ final class ElectionImpl extends Impl implements Election {
|
||||||
requireNonNull(listener, "listener should not be null");
|
requireNonNull(listener, "listener should not be null");
|
||||||
|
|
||||||
LeaderRequest request = LeaderRequest.newBuilder()
|
LeaderRequest request = LeaderRequest.newBuilder()
|
||||||
.setName(Util.prefixNamespace(electionName, namespace))
|
.setName(ByteString.copyFrom(electionName.getBytes()))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
stubWithLeader().observeWithHandler(request,
|
stubWithLeader().observeWithHandler(request,
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -356,7 +357,7 @@ final class WatchImpl extends Impl implements Watch {
|
||||||
private void reschedule() {
|
private void reschedule() {
|
||||||
Futures.addCallback(executor.schedule(this::resume, 500, TimeUnit.MILLISECONDS), new FutureCallback<Object>() {
|
Futures.addCallback(executor.schedule(this::resume, 500, TimeUnit.MILLISECONDS), new FutureCallback<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable t) {
|
public void onFailure(@NonNull Throwable t) {
|
||||||
LOG.warn("scheduled resume failed", t);
|
LOG.warn("scheduled resume failed", t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,6 @@ public class ClientBuilderTest {
|
||||||
assertThatThrownBy(() -> Client.builder().endpoints((URI) null)).isInstanceOf(NullPointerException.class);
|
assertThatThrownBy(() -> Client.builder().endpoints((URI) null)).isInstanceOf(NullPointerException.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testVertx_Null() {
|
|
||||||
assertThatThrownBy(() -> Client.builder().vertx(null)).isInstanceOf(IllegalArgumentException.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEndPoints_Verify_Empty() {
|
public void testEndPoints_Verify_Empty() {
|
||||||
assertThatThrownBy(() -> Client.builder().endpoints(new URI(""))).isInstanceOf(IllegalArgumentException.class);
|
assertThatThrownBy(() -> Client.builder().endpoints(new URI(""))).isInstanceOf(IllegalArgumentException.class);
|
||||||
|
|
Loading…
Reference in New Issue