Skip to content

Commit

Permalink
Removed use of TestExtensions.ToList in datalake samples (Azure#33118)
Browse files Browse the repository at this point in the history
  • Loading branch information
amnguye authored Jan 3, 2023
1 parent b5f3d6a commit d771ba1
Showing 1 changed file with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ public async Task CreateFileClientAsync_Filesystem()
await file.CreateAsync();

// Verify we created one file
AsyncPageable<PathItem> response = filesystem.GetPathsAsync();
IList<PathItem> paths = await response.ToListAsync();
List<PathItem> paths = new List<PathItem>();
await foreach (PathItem path in filesystem.GetPathsAsync())
{
paths.Add(path);
}
Assert.AreEqual(1, paths.Count);

// Cleanup
Expand Down Expand Up @@ -80,8 +83,11 @@ public async Task CreateFileClientAsync_Directory()
await file.CreateAsync();

// Verify we created one file
AsyncPageable<PathItem> response = filesystem.GetPathsAsync();
IList<PathItem> paths = await response.ToListAsync();
List<PathItem> paths = new List<PathItem>();
await foreach (PathItem path in filesystem.GetPathsAsync())
{
paths.Add(path);
}
Assert.AreEqual(1, paths.Count);

// Cleanup
Expand Down Expand Up @@ -113,8 +119,11 @@ public async Task CreateDirectoryClientAsync()
await directory.CreateAsync();

// Verify we created one directory
AsyncPageable<PathItem> response = filesystem.GetPathsAsync();
IList<PathItem> paths = await response.ToListAsync();
List<PathItem> paths = new List<PathItem>();
await foreach (PathItem path in filesystem.GetPathsAsync())
{
paths.Add(path);
}
Assert.AreEqual(1, paths.Count);

// Cleanup
Expand Down Expand Up @@ -198,8 +207,11 @@ public async Task AppendAsync()
await file.CreateAsync();

// Verify we created one file
AsyncPageable<PathItem> response = filesystem.GetPathsAsync();
IList<PathItem> paths = await response.ToListAsync();
List<PathItem> paths = new List<PathItem>();
await foreach (PathItem path in filesystem.GetPathsAsync())
{
paths.Add(path);
}
Assert.AreEqual(1, paths.Count);

// Append data to an existing DataLake File. Append is currently limited to 4000 MB per call.
Expand Down

0 comments on commit d771ba1

Please sign in to comment.