Skip to content

Commit

Permalink
added retries to anthropic ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
LangChain4j committed May 24, 2024
1 parent 102050e commit e34b592
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions langchain4j-anthropic-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>1.9.1</version>
<scope>test</scope>
</dependency>

</dependencies>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import dev.langchain4j.model.output.Response;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.RetryingTest;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;

Expand All @@ -29,7 +29,7 @@ void afterEach() throws InterruptedException {
Thread.sleep(10_000); // to avoid hitting rate limits
}

@Test
@RetryingTest(2)
void should_provide_chat_model() {
contextRunner
.withPropertyValues(
Expand All @@ -46,7 +46,7 @@ void should_provide_chat_model() {
});
}

@Test
@RetryingTest(2)
void should_provide_streaming_chat_model() {
contextRunner
.withPropertyValues(
Expand Down

0 comments on commit e34b592

Please sign in to comment.