diff --git a/dialogflow/snippets/pom.xml b/dialogflow/snippets/pom.xml index 8278c6ca682..25d49bbf777 100644 --- a/dialogflow/snippets/pom.xml +++ b/dialogflow/snippets/pom.xml @@ -44,6 +44,15 @@ + + com.google.cloud + google-cloud-core + 1.94.0 + test + tests + + + junit junit diff --git a/dialogflow/snippets/src/test/java/com/example/dialogflow/CreateDocumentTest.java b/dialogflow/snippets/src/test/java/com/example/dialogflow/CreateDocumentTest.java index 8aaa3830053..dc9c0d4ef89 100644 --- a/dialogflow/snippets/src/test/java/com/example/dialogflow/CreateDocumentTest.java +++ b/dialogflow/snippets/src/test/java/com/example/dialogflow/CreateDocumentTest.java @@ -23,6 +23,7 @@ import com.google.cloud.dialogflow.v2beta1.KnowledgeBase; import com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClient; import com.google.cloud.dialogflow.v2beta1.ProjectName; +import com.google.cloud.testing.junit4.MultipleAttemptsRule; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; @@ -30,6 +31,7 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -84,6 +86,9 @@ public void tearDown() throws IOException { System.setOut(null); } + @Rule + public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(3); + @Test public void testCreateDocument() throws Exception { DocumentManagement.createDocument(