Skip to content

Commit 42b0d5d

Browse files
committed
- updates large file upload for ODSP so it uses a large file and doesn't depend on unexisting folder
1 parent da63532 commit 42b0d5d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/test/java/com/microsoft/graph/functional/OneDriveTests.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,16 @@ public void failure(final ClientException ex) {
5858
*/
5959
@Test
6060
public void testLargeFileUpload() throws IOException, InterruptedException {
61-
String itemId = "01BQHXQL5GQVAGCFJLYRH3EAG2YHGERMQA"; //Test upload folder
62-
6361
//Get resource file from file system
64-
InputStream uploadFile = OneDriveTests.class.getClassLoader().getResourceAsStream("hamilton.jpg");
62+
InputStream uploadFile = OneDriveTests.class.getClassLoader().getResourceAsStream("largefile10M.blob");
6563
long fileSize = (long) uploadFile.available();
6664

6765
UploadSession uploadSession = testBase
6866
.graphClient
6967
.me()
70-
.drive()
71-
.items(itemId)
72-
.itemWithPath("_hamilton.jpg")
68+
.drive()
69+
.root()
70+
.itemWithPath("largefile10M.blob")
7371
.createUploadSession(new DriveItemUploadableProperties())
7472
.buildRequest()
7573
.post();

0 commit comments

Comments
 (0)