Skip to content

Commit

Permalink
fix(test/keel): Javadoc referring to missing method in ImportDelivery…
Browse files Browse the repository at this point in the history
…ConfigTaskTest (#4709)

This fix removes the javadoc link to the missing method: handleRetryableFailures(RetrofitError, ImportDeliveryConfigContext), which was cleaned up as part of the commit : 32e6571.

Co-authored-by: Pranav-b-7 <pranav.bhaskaran@opsmx.com>
  • Loading branch information
Pranav-b-7 and Pranav-b-7 committed Apr 19, 2024
1 parent ae3ef6c commit 3bc345b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.netflix.spinnaker.orca.keel.task

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.convertValue
import com.netflix.spinnaker.kork.annotations.VisibleForTesting
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerHttpException
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerNetworkException
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerServerException
Expand Down Expand Up @@ -182,7 +183,8 @@ constructor(
* Handle (potentially) retryable failures by looking at the HTTP status code. A few 4xx errors
* are handled as special cases to provide more friendly error messages to the UI.
*/
private fun handleRetryableFailures(httpException: SpinnakerHttpException, context: ImportDeliveryConfigContext): TaskResult{
@VisibleForTesting
fun handleRetryableFailures(httpException: SpinnakerHttpException, context: ImportDeliveryConfigContext): TaskResult{
return when {
httpException.responseCode in 400..499 -> {
val responseBody = httpException.responseBody
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.github.tomakehurst.wiremock.http.HttpHeaders;
import com.github.tomakehurst.wiremock.junit5.WireMockExtension;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerHttpException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerRetrofitErrorHandler;
import com.netflix.spinnaker.okhttp.SpinnakerRequestInterceptor;
import com.netflix.spinnaker.orca.KeelService;
Expand Down Expand Up @@ -62,7 +63,6 @@
import org.junit.jupiter.params.provider.MethodSource;
import org.springframework.http.HttpStatus;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.client.OkClient;
import retrofit.converter.JacksonConverter;

Expand Down Expand Up @@ -143,7 +143,7 @@ private static void simulateFault(String url, Fault fault) {
* This test is a positive case which verifies if the task returns {@link
* ImportDeliveryConfigTask.SpringHttpError} on 4xx http error. Here the error body is mocked with
* timestamps in supported Time Units, which will be parsed to exact same timestamp in the
* method @see {@link ImportDeliveryConfigTask#handleRetryableFailures(RetrofitError,
* method @see {@link ImportDeliveryConfigTask#handleRetryableFailures(SpinnakerHttpException,
* ImportDeliveryConfigTask.ImportDeliveryConfigContext)} and results in successful assertions of
* all the fields.
*
Expand Down Expand Up @@ -176,7 +176,7 @@ public void verifyPositiveHttpErrorScenarios(
* This test is a negative case which verifies if the task returns {@link
* ImportDeliveryConfigTask.SpringHttpError} on 4xx http error. Here the error body is mocked with
* timestamp in Time Units that are unsupported, which WILL NOT be parsed to exact timestamp in
* the method @see {@link ImportDeliveryConfigTask#handleRetryableFailures(RetrofitError,
* the method @see {@link ImportDeliveryConfigTask#handleRetryableFailures(SpinnakerHttpException,
* ImportDeliveryConfigTask.ImportDeliveryConfigContext)} and results in will contain incorrect
* timestamp.
*
Expand Down

0 comments on commit 3bc345b

Please sign in to comment.