title: Spring boot and JUnit with H2 JPA causes 'pg_class' not found
body: <p>I currently have a spring boot application which contains 2 configuration files: <strong>application.yaml</strong> and <strong>application-test.yaml</strong>. The application-test profile is loaded correctly and any settings in that file are working as expected.</p>
  
  <p>However i am having an issue with one setting in particular which is spring.jpa.hibernate.ddl-auto = 'update'. When this setting is defined in the <strong>application.yaml</strong> file it causes my JPA unit tests to fail with the exception "Table "PG_CLASS" not found".
  I have tried overriding this setting with different values in the application-test configuration file to no avail.</p>
  
  <p>My full configuration files are as follows:</p>
  
  <p><strong>application.yaml</strong></p>
  
  <pre><code>#Configure Postgres backend datasource
  spring.datasource.driverClassName: org.postgresql.Driver
  spring.datasource.url: jdbc:postgresql://ec2-54-75-233-146.eu-west-1.compute.amazonaws.com:5432/xxxx?user=xxxx&amp;password=xxxxx&amp;sslmode=require
  spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults: false
  spring.jpa.database-platform: org.hibernate.dialect.PostgreSQLDialect
  spring.jpa.hibernate.ddl-auto: update
  </code></pre>
  
  <p><strong>application-test.yaml</strong></p>
  
  <pre><code>spring.datasource.usernam: sa
  spring.datasource.url: jdbc:h2:mem:tests;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;DB_CLOSE_ON_EXIT=FALSE;
  spring.datasource.driverClassName: org.h2.Driver
  spring.jpa.properties.hibernate.temp.use_jdbc_metadata_default: false
  spring.jpa.database-platform: org.hibernate.dialect.H2
  </code></pre>
  
  <p>Uncommenting the "spring.jpa.hibernate.ddl-auto: update" setting in my application.yaml file does fix the issue. But i would like to keep this enabled. Any ideas?</p>