Skip to content

Cpp: Remove broken assert #7285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions cpp/example_code/transfer-manager/transferOnStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ int main(int argc, char** argv)
{
std::cout << "File upload finished." << std::endl;

// Verify that the upload retrieved the expected amount of data.
assert(uploadHandle->GetBytesTotalSize() == uploadHandle->GetBytesTransferred());

auto downloadHandle = transfer_manager->DownloadFile(BUCKET,
KEY,
[&]() { //Define a lambda expression for the callback method parameter to stream back the data.
Expand All @@ -120,9 +117,6 @@ int main(int argc, char** argv)
// Verify the download retrieved the expected length of data.
assert(downloadHandle->GetBytesTotalSize() == downloadHandle->GetBytesTransferred());

// Verify that the length of the upload equals the download.
assert(uploadHandle->GetBytesTotalSize() == downloadHandle->GetBytesTotalSize());

// Write the buffered data to local file copy.
Aws::OFStream storeFile(LOCAL_FILE_COPY.c_str(), Aws::OFStream::out | Aws::OFStream::trunc);
storeFile.write((const char*)(buffer.GetUnderlyingData()),
Expand Down