Skip to content

Commit

Permalink
refactor(retrofit): replace OkClient with Ok3Client (#1844)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirangodishala authored Nov 6, 2024
1 parent c294ae6 commit 1f78f69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.netflix.spinnaker.gate.config

import com.jakewharton.retrofit.Ok3Client
import com.netflix.spinnaker.gate.services.PagerDutyService
import groovy.transform.CompileStatic
import org.springframework.beans.factory.annotation.Value
Expand All @@ -25,7 +26,6 @@ import org.springframework.context.annotation.Configuration
import retrofit.Endpoint
import retrofit.RequestInterceptor
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter

import static retrofit.Endpoints.newFixedEndpoint
Expand Down Expand Up @@ -56,7 +56,7 @@ class PagerDutyConfig {
PagerDutyService pagerDutyService(Endpoint pagerDutyEndpoint) {
new RestAdapter.Builder()
.setEndpoint(pagerDutyEndpoint)
.setClient(new OkClient())
.setClient(new Ok3Client())
.setConverter(new JacksonConverter())
.setRequestInterceptor(requestInterceptor)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.netflix.spinnaker.gate

import com.fasterxml.jackson.databind.ObjectMapper
import com.jakewharton.retrofit.Ok3Client
import com.netflix.spectator.api.NoopRegistry
import com.netflix.spinnaker.config.ErrorConfiguration
import com.netflix.spinnaker.fiat.shared.FiatClientConfigurationProperties
Expand All @@ -41,7 +42,6 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
import retrofit.RetrofitError
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter
import retrofit.mime.TypedInput
import spock.lang.Shared
Expand Down Expand Up @@ -116,7 +116,7 @@ class FunctionalSpec extends Specification {
def localPort = ctx.environment.getProperty("local.server.port")
api = new RestAdapter.Builder()
.setEndpoint("http://localhost:${localPort}")
.setClient(new OkClient())
.setClient(new Ok3Client())
.setConverter(new JacksonConverter())
.setLogLevel(RestAdapter.LogLevel.FULL)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.netflix.spinnaker.gate.controllers

import com.fasterxml.jackson.databind.ObjectMapper
import com.jakewharton.retrofit.Ok3Client
import com.netflix.spinnaker.gate.services.WebhookService
import com.netflix.spinnaker.gate.services.internal.EchoService
import com.netflix.spinnaker.gate.services.internal.OrcaServiceSelector
Expand All @@ -29,7 +30,6 @@ import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.setup.MockMvcBuilders
import org.springframework.web.util.NestedServletException
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter
import spock.lang.Specification

Expand All @@ -54,7 +54,7 @@ class WebhooksControllerSpec extends Specification {

EchoService echoService = new RestAdapter.Builder()
.setEndpoint("http://localhost:${localPort}")
.setClient(new OkClient())
.setClient(new Ok3Client())
.setConverter(new JacksonConverter())
.build()
.create(EchoService)
Expand Down

0 comments on commit 1f78f69

Please sign in to comment.