You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework SqlLineTest so that it actually interacts with the database (#3273)
The previous code called `SqlLine.main` which would call `System.exit`
once SqlLine finished processing, which would mean that JUnit wouldn't
get any result back, and the test would be marked as ignored.
This doesn't seem like great design from the gradle perspective. During
the rework, I also discovered that:
1. If you create the `SqlLine` object, you can change the `OutputStream`
it uses (and error), so you don't need to change system out, or err.
2. The driver provided was wrong (it is `JDBCRelationalDriver`, not
`JDBCEmbedDriver`)
3. the url was wrong (it's `jdbc:relational` not `jdbc:embed`, and you
need three / before the database, not 1)
4. it missed the `-` before the `-e` in the argument list
Note: I thought about adding an interactive test, where it runs multiple
statements, but that started to get complicated, and didn't seem
worthwhile.
0 commit comments