From 811b01816bfb214d44fcdae010a489e7ab4e2486 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 8 Nov 2018 10:41:31 -0800 Subject: [PATCH] CR round 3 --- interface/src/assets/ATPAssetMigrator.cpp | 2 +- libraries/networking/src/AssetUpload.cpp | 4 ++++ libraries/networking/src/ResourceCache.cpp | 2 +- .../unit_tests/moduleTests/entity/entityPreloadAPIError.js | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/src/assets/ATPAssetMigrator.cpp b/interface/src/assets/ATPAssetMigrator.cpp index 41f2367670..59e2277cec 100644 --- a/interface/src/assets/ATPAssetMigrator.cpp +++ b/interface/src/assets/ATPAssetMigrator.cpp @@ -209,7 +209,7 @@ void ATPAssetMigrator::migrateResource(ResourceRequest* request) { // add this URL to our hash of AssetUpload to original URL _originalURLs.insert(upload, request->getUrl()); - qCDebug(asset_migrator) << "Starting upload of asset"; + qCDebug(asset_migrator) << "Starting upload of asset from" << request->getUrl(); // connect to the finished signal so we know when the AssetUpload is done QObject::connect(upload, &AssetUpload::finished, this, &ATPAssetMigrator::assetUploadFinished); diff --git a/libraries/networking/src/AssetUpload.cpp b/libraries/networking/src/AssetUpload.cpp index d4dfa6554b..f1c84e474a 100644 --- a/libraries/networking/src/AssetUpload.cpp +++ b/libraries/networking/src/AssetUpload.cpp @@ -76,6 +76,10 @@ void AssetUpload::start() { // ask the AssetClient to upload the asset and emit the proper signals from the passed callback auto assetClient = DependencyManager::get(); + + if (!_filename.isEmpty()) { + qCDebug(asset_client) << "Attempting to upload" << _filename << "to asset-server."; + } assetClient->uploadAsset(_data, [this](bool responseReceived, AssetUtils::AssetServerError error, const QString& hash){ if (!responseReceived) { diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index fa7dae1bf1..98e6a453e9 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -765,7 +765,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { bool willRetry = false; switch (result) { case ResourceRequest::Result::Timeout: { - qCDebug(networking) << "Timed out, received" << _bytesReceived << "total" << _bytesTotal; + qCDebug(networking) << "Timed out loading" << _url.fileName() << "received" << _bytesReceived << "total" << _bytesTotal; // Fall through to other cases } // FALLTHRU diff --git a/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js b/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js index 2dac86947b..eaee178b0a 100644 --- a/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js +++ b/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js @@ -2,12 +2,12 @@ // test module method exception being thrown within preload (function() { var apiMethod = Script.require('../exceptions/exceptionInFunction.js'); - print("apiMethod", apiMethod); + print(Script.resolvePath(''), "apiMethod", apiMethod); return { preload: function(uuid) { // this next line throws from within apiMethod print(apiMethod()); - print("entityPreloadAPIException::preload -- never seen --", uuid); + print("entityPreloadAPIException::preload -- never seen --", uuid, Script.resolvePath('')); }, }; });