[keycloak-dev] table locks

Marek Posolda mposolda at redhat.com
Fri Feb 19 12:10:36 EST 2016


I am often unit-testing from IDEA with MySQL or PostgreSQL. This might 
help with table locks.

You need to set system properties like (see keycloak-server.json):
-Dkeycloak.connectionsJpa.url=jdbc:mysql://localhost/keycloak 
-Dkeycloak.connectionsJpa.driver=com.mysql.jdbc.Driver 
-Dkeycloak.connectionsJpa.user=keycloak 
-Dkeycloak.connectionsJpa.password=keycloak

Also you need to put MySQL dependency to testsuite/integration/pom.xml :

<dependency>
     <groupId>mysql</groupId>
     <artifactId>mysql-connector-java</artifactId>
</dependency> or: <dependency>
     <groupId>org.postgresql</groupId>
     <artifactId>postgresql</artifactId>
     <version>${postgresql.version}</version>
</dependency> This is not needed if you start test from command line 
with maven, as maven will use the "mysql" or "postgresql" profile and 
will use dependency by default. Marek

On 19/02/16 16:39, Bill Burke wrote:
> FYI, I don't think I can really fix, but I tried a concurrency test that
> creates, fetches, and then deletes a client in multiple concurrent
> threads.  HSQL is giving me deadlock exceptions.  Looks like it is
> trying to obtain table locks.  Sucks as I can't really unit test this
> scenario.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160219/bd74390f/attachment.html 


More information about the keycloak-dev mailing list