testcontainers / testcontainers/testcontainers-java
Mssql java hibernate locks tables
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 2g 17h
- PR unite (30g)
- 9
Descrizione
The Issue is:
-When running the application (spring data mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04) with a docker container everything worked as expected.
-When running the application with testcontainers the tables stayed locked (using the same image all the time).
-When removing the crudRepository from Spring Data in the test and using the raw entity manager the tables locked (the test could pass because of the persistence context of hibernate).
-When using raw JDBC the test worked fine.
I'm using Junit 5, testcontainerVersion 1.14.3 and Hiberante core 5.4.21.Final (spring boot version2.3.4.RELEASE).
I don't really know if this is an Hiberante or a testcontainers issue, because Hibernate did work normally with docker, but started locking tables with when testcontainers got involved.

Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non sono indicati file del repository né punti di ingresso specifici dei test. Inizia riproducendo il test JUnit 5 con Testcontainers 1.14.3, Hibernate 5.4.21.Final, Spring Boot 2.3.4 e l’immagine SQL Server indicata, quindi confronta il comportamento di CrudRepository, di EntityManager grezzo e di JDBC; il lavoro è completato quando viene identificato se Testcontainers o Hibernate causa i blocchi delle tabelle e viene documentata una risoluzione verificata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, java, spring
- Ambito
- backend, databases, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100