Skip to content

Commit 754df6e

Browse files
authored
Force delete to wait for call to finish to fix tests (#1830)
1 parent 071a8d4 commit 754df6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dialogflow/cloud-client/src/main/java/com/example/dialogflow/DocumentManagement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static Document getDocument(String documentName) throws Exception {
134134
public static void deleteDocument(String documentName) throws Exception {
135135
// Instantiates a client
136136
try (DocumentsClient documentsClient = DocumentsClient.create()) {
137-
documentsClient.deleteDocumentAsync(documentName).getInitialFuture().get();
137+
documentsClient.deleteDocumentAsync(documentName).get();
138138
System.out.format("The document has been deleted.");
139139
}
140140
}

0 commit comments

Comments
 (0)