Fix unstable test cases (#6541)
This commit is contained in:
parent
cefaf3a978
commit
8b092ab175
@ -588,7 +588,11 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
EXPECT_TRUE(downloadResult.Value.Details.EncryptionContext.HasValue());
|
||||
EXPECT_EQ(encryptionContext, downloadResult.Value.Details.EncryptionContext.Value());
|
||||
// Assert DataLakeDirectoryClient::ListPaths
|
||||
auto paths = directoryClient.ListPaths(false).Paths;
|
||||
std::vector<Files::DataLake::Models::PathItem> paths;
|
||||
for (auto page = directoryClient.ListPaths(false); page.HasPage(); page.MoveToNextPage())
|
||||
{
|
||||
paths.insert(paths.end(), page.Paths.begin(), page.Paths.end());
|
||||
}
|
||||
EXPECT_EQ(paths.size(), 1);
|
||||
EXPECT_TRUE(paths[0].EncryptionContext.HasValue());
|
||||
EXPECT_EQ(encryptionContext, paths[0].EncryptionContext.Value());
|
||||
|
||||
@ -272,10 +272,14 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
EXPECT_NO_THROW(fileClient.ScheduleDeletion(
|
||||
Files::DataLake::ScheduleFileExpiryOriginType::Absolute, options));
|
||||
|
||||
auto pagedResult = m_fileSystemClient->ListPaths(true);
|
||||
EXPECT_EQ(1L, pagedResult.Paths.size());
|
||||
ASSERT_TRUE(pagedResult.Paths[0].ExpiresOn.HasValue());
|
||||
EXPECT_EQ(options.ExpiresOn.Value(), pagedResult.Paths[0].ExpiresOn.Value());
|
||||
std::vector<Files::DataLake::Models::PathItem> paths;
|
||||
for (auto page = m_fileSystemClient->ListPaths(true); page.HasPage(); page.MoveToNextPage())
|
||||
{
|
||||
paths.insert(paths.end(), page.Paths.begin(), page.Paths.end());
|
||||
}
|
||||
EXPECT_EQ(1L, paths.size());
|
||||
ASSERT_TRUE(paths[0].ExpiresOn.HasValue());
|
||||
EXPECT_EQ(options.ExpiresOn.Value(), paths[0].ExpiresOn.Value());
|
||||
}
|
||||
|
||||
TEST_F(DataLakeFileSystemClientTest, UnencodedPathDirectoryFileNameWorks)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user