Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create preexisting table when running tests for multiple jobs in Jenkins #153

Open
paul-uz opened this issue Jun 30, 2022 · 2 comments

Comments

@paul-uz
Copy link

paul-uz commented Jun 30, 2022

We use Jenkins to test, build and deploy our code for multiple clients.

The jobs run in parallel, so when we write tests which use this library, we encounter an issue where only one job will pass the tests, with the rest failing with "Cannot create preexisting table", which makes sense, as they all use the same codebase, which all reference the same local address for jest-dynamodb, https://localhost:8000.

Is there anyway around this?

Would using random ports work, or does it have to be 8000?

@vladholubiev
Copy link
Member

Yes, you can have multiple configs at different ports if you want to parallelize

CleanShot 2022-07-19 at 22 57 41@2x

Alternatively, PRs are welcome to change the logic to optionally skip table creation if it exist already

@paul-uz
Copy link
Author

paul-uz commented Oct 21, 2022

@vladgolubev how do i setup the multiple configs?

How do I then make sure my code connects to the correct port?

Eg if i run two jobs, client A and client B, they use the same codebase, but I'd need to somehow tell A to use port 8000 and B to use 8001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants