Skip to content

Commit

Permalink
CID-2940 Use 3 max attempts for retrying establishing connection
Browse files Browse the repository at this point in the history
  • Loading branch information
geoandri committed Dec 13, 2024
1 parent 948d288 commit 7500fc2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class WebSocketClientConfigTests {
private lateinit var authService: LeanIXAuthService
private lateinit var leanIXProperties: LeanIXProperties
private lateinit var gitHubEnterpriseProperties: GitHubEnterpriseProperties
private lateinit var leanIXAuthService: LeanIXAuthService

@BeforeEach
fun setUp() {
Expand All @@ -32,7 +33,14 @@ class WebSocketClientConfigTests {
stompClient = mockk()
stompSession = mockk()
authService = mockk()
webSocketClientConfig = WebSocketClientConfig(brokerStompSessionHandler, objectMapper, leanIXProperties)
leanIXAuthService = mockk()
webSocketClientConfig = WebSocketClientConfig(
brokerStompSessionHandler,
objectMapper,
leanIXAuthService,
leanIXProperties,
gitHubEnterpriseProperties
)

GitHubAgentProperties.GITHUB_AGENT_VERSION = "test-version"
}
Expand All @@ -43,6 +51,7 @@ class WebSocketClientConfigTests {
coEvery { leanIXProperties.wsBaseUrl } returns "ws://test.url"
coEvery { gitHubEnterpriseProperties.baseUrl } returns "http://github.enterprise.url"
coEvery { gitHubEnterpriseProperties.gitHubAppId } returns "appId"
coEvery { leanIXAuthService.getBearerToken() } returns "bearer token"
coEvery {
stompClient.connectAsync(
any<String>(), any<WebSocketHttpHeaders>(),
Expand Down

0 comments on commit 7500fc2

Please sign in to comment.