USING: accessors alien continuations db db.errors db.queries db.postgresql
db.private db.tester db.tuples db.types io classes kernel math namespaces
prettyprint sequences system tools.test unicode ;
-IN: db.postgresql.tests
-
-: nonexistant-db ( -- db )
- <postgresql-db>
- "localhost" >>host
- "fake-user" >>username
- "no-pass" >>password
- "dont-exist" >>database ;
-
-! Don't leak connections
-{ } [
- 2000 [ [ nonexistant-db [ ] with-db ] ignore-errors ] times
-] unit-test
! Ensure the test database exists
postgresql-template1-db [