-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconcile RetrySettings & Clock (google-cloud-java part) #1738
Conversation
Reconcile RetrySettings in GAX with RetryParams in google-cloud-java googleapis#1574 Reconcile NanoClock in GAX with Clock in google-cloud-java googleapis#1575
… and NanoClock -> ApiClock renaming).
pom.xml
Outdated
@@ -92,7 +92,7 @@ | |||
<github.global.server>github</github.global.server> | |||
<google.auth.version>0.6.0</google.auth.version> | |||
<grpc.version>1.0.3</grpc.version> | |||
<gax.version>0.4.0</gax.version> | |||
<gax.version>0.3.2-SNAPSHOT</gax.version> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
private TranslateOptions options; | ||
private TranslateRpcFactory rpcFactoryMock; | ||
private TranslateRpc translateRpcMock; | ||
private Translate translate; | ||
|
||
@Rule | ||
public ExpectedException thrown = ExpectedException.none(); | ||
@Rule public ExpectedException thrown = ExpectedException.none(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
private static final String META_FILE_ROOT = "/META-INF/maven/"; | ||
private static final String META_VERSION_KEY = "version"; | ||
private static final RetrySettings DEFAULT_RETRY_SETTINGS = getDefaultRetrySettingsBuilder() | ||
.build(); | ||
private static final RetrySettings NO_RETRY_SETTINGS = getDefaultRetrySettingsBuilder() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* | ||
* @param <V> return value of the closure that is being run with retries | ||
* Utility class for retrying operations. For more details about the parameters, see {@link | ||
* RetrySettings}. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -264,6 +261,12 @@ boolean shouldRetry(Exception ex) { | |||
} | |||
|
|||
@Override | |||
public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, | |||
TimedAttemptSettings prevSettings) { | |||
return null; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -295,12 +295,9 @@ private static String message(IOException exception) { | |||
return exception.getMessage(); | |||
} | |||
|
|||
protected static void translateAndPropagateIfPossible(RetryHelper.RetryHelperException ex) { | |||
protected static void translate(RetryHelper.RetryHelperException ex) { | |||
if (ex.getCause() instanceof BaseServiceException) { | |||
throw (BaseServiceException) ex.getCause(); | |||
} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -33,7 +35,7 @@ | |||
/** | |||
* Exception handling used by {@link RetryHelper}. | |||
*/ | |||
public final class ExceptionHandler implements Serializable { | |||
public final class ExceptionHandler implements ExceptionRetryAlgorithm, Serializable { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -33,7 +35,7 @@ | |||
/** | |||
* Exception handling used by {@link RetryHelper}. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I am concerned with the CI build failure. |
Adressed PR comments. PTAL. The CI will not pass at this point, because it needs #1775 PR to be merged first (without that the code is not compilable) |
LGTM after at least two of the tests pass. |
Changes Unknown when pulling ca31a82 on vam-google:master into ** on GoogleCloudPlatform:master**. |
Reconcile RetrySettings in GAX with RetryParams in google-cloud-java
#1574
Reconcile NanoClock in GAX with Clock in google-cloud-java
#1575