Skip to content

Commit

Permalink
Use separate queue names in dev vs. test
Browse files Browse the repository at this point in the history
This allows the tests to run successfully in another process while the
system is started in a dev repl.
  • Loading branch information
tobias committed Feb 1, 2024
1 parent c329e1c commit 25a2479
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions dev-resources/elasticmq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ include classpath("application.conf")

queues {
clojars-events {
defaultVisibilityTimeout = 60 seconds
# This is 20s in production, but we don't want to wait that long to shut down the system in
# dev
receiveMessageWait = 0 seconds
}
clojars-events-test {
defaultVisibilityTimeout = 60 seconds
# This is 20s in production, but we don't want to wait that long to shut down the system in
# testing
Expand Down
20 changes: 11 additions & 9 deletions resources/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@
:default "clojars"}}
:deletion-backup-dir #profile {:production "/home/clojars/repo-deleted"
:default "data/test/repo-backup"}
:event-queue #profile {:production {:queue-url "https://sqs.us-east-2.amazonaws.com/825662292780/clojars-events"
:dev-event-queue-url #profile {:test "http://localhost:9324/000000000000/clojars-events-test"
:default "http://localhost:9324/000000000000/clojars-events"}
:event-queue #profile {:production {:queue-url "https://sqs.us-east-2.amazonaws.com/825662292780/clojars-events"
:message-wait-timeout 20}
:default {:credentials {:access-key-id "fake-access-key"
:secret-access-key "fake-secret-key"}
:endpoint {:protocol "http"
:hostname "localhost"
:port 9324}
:region "us-east-1"
:queue-url "http://localhost:9324/000000000000/clojars-events"
:default {:credentials {:access-key-id "fake-access-key"
:secret-access-key "fake-secret-key"}
:endpoint {:protocol "http"
:hostname "localhost"
:port 9324}
:region "us-east-1"
:queue-url #ref [:dev-event-queue-url]
:message-wait-timeout #profile {:default 5
:test nil}}}
:test nil}}}
:github-oauth {:client-id #profile {:production #ssm-parameter "/clojars/production/github_oauth_client_id"
:default "testing"}
:client-secret #profile {:production #ssm-parameter "/clojars/production/github_oauth_client_secret"
Expand Down

0 comments on commit 25a2479

Please sign in to comment.