1

I am trying to execute some sql script using

property name="url" value="someurl;INIT=RUNSCRIPT FROM 'mytestscript.sql';

I am not sure -

  1. Sql script file loaded or not, Since these configuration has been done for Junit using H2 database i can't run query to verify the same in database

1 Answer 1

0

If you're sure that connection URL is used by your test system as is and the same database is not already open without such INIT parameter, you can be sure that script will be executed completely without any errors, H2 does not open a connection if INIT wasn't completed normally, an SQLException will be thrown on connection attempt.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks @Evgenij. This stackoverflow.com/questions/4490138/… worked for me. I had my script in different directory than resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.