Skip to content

Commit ca72737

Browse files
Append A GUID to Media ID
testUploadDownloadDeleteMedia was failing intermittently during Matrix Testing because of concurrent tests using the same static MediaId. Appended a Java UUID string to the mediaId to ensure uniqueness among concurrently run tests.
1 parent aa136ea commit ca72737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/bandwidth/MessagingApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void testUploadDownloadDeleteMedia() throws Exception {
8484
byte[] fileContents = Files.readAllBytes(file.toPath());
8585
FileWrapper body = new FileWrapper(file, contentType);
8686

87-
final String mediaId = "java-media-test";
87+
final String mediaId = "java-media-test_" + java.util.UUID.randomUUID();
8888

8989
ApiResponse<Void> uploadMediaApiResponse = controller.uploadMedia(ACCOUNT_ID, mediaId, body, contentType, "no-cache");
9090
assertEquals("Response Code is not 204", 204, uploadMediaApiResponse.getStatusCode());

0 commit comments

Comments
 (0)