~michihenning/storage-framework/stand-alone-provider-headers

« back to all changes in this revision

Viewing changes to tests/local-client/local-client_test.cpp

  • Committer: Michi Henning
  • Date: 2016-08-23 23:45:34 UTC
  • mfrom: (53.1.4 devel)
  • Revision ID: michi.henning@canonical.com-20160823234534-4owayhnhcp67g39q
Merged devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
423
423
    EXPECT_EQ(0, file->size());
424
424
    auto old_etag = file->etag();
425
425
 
 
426
    qDebug() << "Uploading 0 bytes";
426
427
    // Create uploader for the file and write nothing.
427
428
    uploader = call(file->create_uploader(ConflictPolicy::overwrite, 0));
428
429
    file = call(uploader->finish_upload());
433
434
    uploader = call(file->create_uploader(ConflictPolicy::overwrite, s.size()));
434
435
    EXPECT_EQ(1000000, uploader->size());
435
436
    uploader->socket()->write(&s[0], s.size());
 
437
    qDebug() << "Waiting for write to complete";
 
438
    uploader->socket()->waitForBytesWritten(SIGNAL_WAIT_TIME);
436
439
 
437
440
    // Need to sleep here, otherwise it is possible for the
438
441
    // upload to finish within the granularity of the file system time stamps.