Skip to content

Commit 28f86bf

Browse files
migrate junit4 to junit5 in JdbcChatMemoryRepositoryHsqldbAutoConfigIT (#3633)
Auto-cherry-pick to 1.0.x Fixes #3633 Signed-off-by: jonghoonpark <dev@jonghoonpark.com>
1 parent 8733938 commit 28f86bf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

auto-configurations/models/chat/memory/repository/spring-ai-autoconfigure-model-chat-memory-repository-jdbc/src/test/java/org/springframework/ai/model/chat/memory/repository/jdbc/autoconfigure/JdbcChatMemoryRepositoryHsqldbAutoConfigurationIT.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
import java.util.List;
2020

21-
import org.junit.Before;
22-
import org.junit.Test;
23-
import org.junit.runner.RunWith;
21+
import org.junit.jupiter.api.BeforeEach;
22+
import org.junit.jupiter.api.Test;
23+
import org.junit.jupiter.api.extension.ExtendWith;
2424

2525
import org.springframework.ai.chat.memory.repository.jdbc.JdbcChatMemoryRepository;
2626
import org.springframework.ai.chat.messages.AssistantMessage;
@@ -34,12 +34,12 @@
3434
import org.springframework.boot.test.context.SpringBootTest;
3535
import org.springframework.context.ApplicationContext;
3636
import org.springframework.jdbc.core.JdbcTemplate;
37-
import org.springframework.test.context.junit4.SpringRunner;
37+
import org.springframework.test.context.junit.jupiter.SpringExtension;
3838

3939
import static org.assertj.core.api.Assertions.assertThat;
4040
import static org.assertj.core.api.Assertions.fail;
4141

42-
@RunWith(SpringRunner.class)
42+
@ExtendWith(SpringExtension.class)
4343
@SpringBootTest(classes = JdbcChatMemoryRepositoryHsqldbAutoConfigurationIT.TestConfig.class,
4444
properties = { "spring.datasource.url=jdbc:hsqldb:mem:chat_memory_auto_configuration_test;DB_CLOSE_DELAY=-1",
4545
"spring.datasource.username=sa", "spring.datasource.password=",
@@ -66,7 +66,7 @@ public class JdbcChatMemoryRepositoryHsqldbAutoConfigurationIT {
6666
/**
6767
* can't get the automatic loading of the schema with boot to work.
6868
*/
69-
@Before
69+
@BeforeEach
7070
public void setUp() {
7171
// Explicitly initialize the schema
7272
try {

0 commit comments

Comments
 (0)