News for hackers. Stuff that matters.
Re:AWS is not a dumb pipe by greiskul on Friday January 21, 2022 @07:11PM (#30031666)
I hate this practice that some companies do of testing their sql database usage... By using another database. For postgres, if you are using the jvm, you can use the amazing test containers library to test reasonably fast, with a postgres database that you can set up to be the same version as you use in production.

Any database vendor should either support having their database used quickly in test like these, or at least release a simplified in memory version of their database so people can test their code. If your database is not testable, that should be a black mark against choosing it for a project.

Re:AWS is not a dumb pipe by syspec on Saturday January 22, 2022 @01:18PM (#30039308)
Which library are you referring to?

I'm new to jvm programming, and was wondering about this as I'm used to rails where the test db is spun up on your behalf and is usually the same db

Re:AWS is not a dumb pipe by closeparen on Friday January 21, 2022 @08:32PM (#30032217)
Much better than mocking out cursor objects!
Re:AWS is not a dumb pipe by djbusby on Friday January 21, 2022 @07:18PM (#30031703)
For PG you can just initdb in a tmpfs.
Re:AWS is not a dumb pipe by denysvitali on Friday January 21, 2022 @07:55PM (#30031960)
Or (and this can be done with pretty much everything) spin up a container
Re:AWS is not a dumb pipe by thejosh on Saturday January 22, 2022 @01:15AM (#30034174)
With elixir and ecto it wraps the whole thing in a transaction so it runs Async across multiple tests.