Note that there are some explanatory texts on larger screens.

plurals
  1. POPlay Framework Junit test case Db error
    text
    copied!<p>Am new to play framework and Junit. Have little bit knowledge in java. Based on play framework getting started and documentation am started to write unit tests for play application. When i run the application in normal mode. It works fine with database models. </p> <p>when i run the application in test mode. <strong>it shows jpa query exception and schema not found.</strong></p> <p>Am attached the test class file for your reference : -</p> <pre><code>import org.junit.*; import java.net.*; import java.util.*; import play.test.*; import play.test.FunctionalTest.URL; import models.*; import params.*; public class BasicTest extends UnitTest { @Test public void testing(){ //User user = null; User user = User.find("byUsernameAndPassword","admin","Y29tcGFzczEyMw==").first(); assertNotNull(user); //assertNotNull("test"); } } </code></pre> <p>Anyone help me to fix this issue.</p> <p>This is my current application.conf settings in play :</p> <pre><code>db.url=jdbc:vertica://verticadatabaseurlurl/XXXXXXX db.driver=com.vertica.Driver db.user=XXXXX db.pass=XXXXXX db.schema=XXXXXX # JPA Configuration (Hibernate) # ~~~~~ # # Specify the custom JPA dialect to use here (default to guess): jpa.dialect=org.hibernate.dialect.PostgreSQLDialect # # Specify the ddl generation pattern to use. Set to none to disable it # (default to update in DEV mode, and none in PROD mode): jpa.ddl=none # # Debug SQL statements (logged using DEBUG level): jpa.debugSQL=true # # You can even specify additional hibernate properties here: # hibernate.use_sql_comments=true # ... # #%test.module.cobertura=${play.path}/modules/cobertura %test.application.mode=dev %test.db.url=jdbc:h2:mem:play;MODE=MYSQL;LOCK_MODE=0 %test.db=mem %test.jpa.ddl=create %test.mail.smtp=mock </code></pre> <p>am currently using vertica for database. By this settings can able to run the application in normal mode. In test mode it makes that issue.</p> <p><a href="http://tinypic.com/r/a48zg4/7" rel="nofollow">http://tinypic.com/r/a48zg4/7</a> -screenshot reference</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload