-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitOrigin-RevId: 34e453645bf0c7d8e076237421449b2767301cc4
- Loading branch information
1 parent
f3a947b
commit 0013008
Showing
8 changed files
with
158 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
misk-aws2-sqs/src/test/kotlin/misk/aws2/sqs/jobqueue/SqsQueueResolverTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package misk.aws2.sqs.jobqueue | ||
|
||
import jakarta.inject.Inject | ||
import misk.jobqueue.QueueName | ||
import misk.testing.MiskExternalDependency | ||
import misk.testing.MiskTest | ||
import misk.testing.MiskTestModule | ||
import org.junit.jupiter.api.Disabled | ||
import org.junit.jupiter.api.Test | ||
import software.amazon.awssdk.services.sqs.model.CreateQueueRequest | ||
import software.amazon.awssdk.services.sqs.model.QueueAttributeName | ||
import kotlin.test.assertEquals | ||
|
||
@MiskTest(startService = true) | ||
class SqsQueueResolverTest { | ||
@MiskExternalDependency private val dockerSqs = DockerSqs | ||
@MiskTestModule private val module = SqsJobQueueTestModule(dockerSqs) | ||
|
||
@Inject | ||
private lateinit var queueResolver: QueueResolver | ||
|
||
@Test | ||
@Disabled("Disabled test until docker authorization issues are resolvedc") | ||
fun `caches queue URL`() { | ||
val queueName = QueueName("test-queue") | ||
|
||
DockerSqs.client.createQueue( | ||
CreateQueueRequest.builder().queueName(queueName.value) | ||
.attributes( | ||
mapOf( | ||
QueueAttributeName.RECEIVE_MESSAGE_WAIT_TIME_SECONDS to "20", | ||
)) | ||
.build() | ||
).join() | ||
|
||
val result = queueResolver.getQueueUrl(queueName) | ||
queueResolver.getQueueUrl(queueName) | ||
|
||
assertEquals("test", result) | ||
} | ||
} |