Commit 3de62e47fcb352e3b5a2f457e54297e297590c0d
1 parent
7a831760
Amélioration des tests et résolution du blocage de tests à 50%
Showing
4 changed files
with
5 additions
and
3 deletions
Show diff stats
.gitignore
src/main/java/fr/plil/sio/persistence/jdbc/UserRepositoryJdbc.java
@@ -36,7 +36,7 @@ public class UserRepositoryJdbc implements UserRepository { | @@ -36,7 +36,7 @@ public class UserRepositoryJdbc implements UserRepository { | ||
36 | stmt = dataSource.getConnection().createStatement(); | 36 | stmt = dataSource.getConnection().createStatement(); |
37 | rs = stmt.executeQuery("SELECT * FROM USER_T WHERE NAME_U = \'" + name + "\'"); | 37 | rs = stmt.executeQuery("SELECT * FROM USER_T WHERE NAME_U = \'" + name + "\'"); |
38 | if (rs.next()) { | 38 | if (rs.next()) { |
39 | - logger.debug("found group " + name); | 39 | + logger.debug("found user " + name); |
40 | User user= new User(); | 40 | User user= new User(); |
41 | user.setId(rs.getLong("USER_ID")); | 41 | user.setId(rs.getLong("USER_ID")); |
42 | user.setName(rs.getString("NAME_U")); | 42 | user.setName(rs.getString("NAME_U")); |
src/main/java/fr/plil/sio/persistence/jdbc/UserServiceJdbc.java
@@ -22,7 +22,7 @@ public class UserServiceJdbc implements UserService { | @@ -22,7 +22,7 @@ public class UserServiceJdbc implements UserService { | ||
22 | throw new IllegalStateException("a group with the same name already exists"); | 22 | throw new IllegalStateException("a group with the same name already exists"); |
23 | } | 23 | } |
24 | user = new User(); | 24 | user = new User(); |
25 | - user.setName(name); | 25 | + user.setName(name); |
26 | userRepository.save(user); | 26 | userRepository.save(user); |
27 | return user; | 27 | return user; |
28 | } | 28 | } |
src/test/resources/application.properties
1 | logging.level.org.springframework=INFO | 1 | logging.level.org.springframework=INFO |
2 | logging.level.org.hibernate.SQL=DEBUG | 2 | logging.level.org.hibernate.SQL=DEBUG |
3 | logging.level.org.hibernate=INFO | 3 | logging.level.org.hibernate=INFO |
4 | -spring.datasource.url=jdbc:h2:mem:persistence;TRACE_LEVEL_FILE=4 | ||
5 | \ No newline at end of file | 4 | \ No newline at end of file |
5 | +spring.datasource.url=jdbc:h2:mem:persistence;TRACE_LEVEL_FILE=4 | ||
6 | +spring.datasource.maxActive=300 | ||
6 | \ No newline at end of file | 7 | \ No newline at end of file |