From 4cc65adc1fec57d4a61e07dd888f74f56b9d5ccd Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Fri, 18 Oct 2024 09:57:12 +0800 Subject: [PATCH] az/log: new debug flag azDebugFlag for az logging --- contrib/test/azure/CMakeLists.txt | 3 --- contrib/test/azure/main.cpp | 39 ++++++++++++------------------- tests/system-test/2-query/db.py | 2 +- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/contrib/test/azure/CMakeLists.txt b/contrib/test/azure/CMakeLists.txt index b3db1dffce..35c87312d0 100644 --- a/contrib/test/azure/CMakeLists.txt +++ b/contrib/test/azure/CMakeLists.txt @@ -6,9 +6,6 @@ add_executable ( main.cpp ) -# Link to Azure SDK -#target_link_libraries(application _azure_sdk) - find_library(CURL_LIBRARY curl $ENV{HOME}/.cos-local.2/lib NO_DEFAULT_PATH) find_library(XML2_LIBRARY xml2 $ENV{HOME}/.cos-local.2/lib NO_DEFAULT_PATH) #find_library(XML2_LIBRARY xml2) diff --git a/contrib/test/azure/main.cpp b/contrib/test/azure/main.cpp index 5d52801329..09eadecd69 100644 --- a/contrib/test/azure/main.cpp +++ b/contrib/test/azure/main.cpp @@ -1,6 +1,3 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - /** * @file * @brief Application that consumes the Azure SDK for C++. @@ -16,36 +13,30 @@ using namespace Azure::Storage::Blobs; -int main(int argc, char* argv[]) -{ +int main(int argc, char* argv[]) { (void)argc; (void)argv; /**************** Container SDK client ************************/ /**************** Create container ************************/ - try - { - auto containerClient = BlobContainerClient::CreateFromConnectionString( - std::getenv("STORAGE_CONNECTION_STRING"), "td-test"); - //containerClient.CreateIfNotExists(); + try { + auto containerClient = + BlobContainerClient::CreateFromConnectionString(std::getenv("STORAGE_CONNECTION_STRING"), "td-test"); + // containerClient.CreateIfNotExists(); /**************** Container SDK client ************************/ /**************** list blobs (one page) ******************/ - //auto response = containerClient.ListBlobsSinglePage(); - //auto response = containerClient.ListBlobs(); - //auto blobListPage = response.Value; - //auto blobListPage = response.Blobs; - for (auto page = containerClient.ListBlobs(/*options*/); page.HasPage(); page.MoveToNextPage()) - { - for (auto& blob : page.Blobs) - { - std::cout << blob.Name << std::endl; - } - } + // auto response = containerClient.ListBlobsSinglePage(); + // auto response = containerClient.ListBlobs(); + // auto blobListPage = response.Value; + // auto blobListPage = response.Blobs; + for (auto page = containerClient.ListBlobs(/*options*/); page.HasPage(); page.MoveToNextPage()) { + for (auto& blob : page.Blobs) { + std::cout << blob.Name << std::endl; + } + } - } - catch (const std::exception& ex) - { + } catch (const std::exception& ex) { std::cout << ex.what(); return 1; } diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index 588609e524..1964cea51f 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -57,7 +57,7 @@ class TDTestCase: tdSql.checkData(0, 2, 0) tdSql.query("show dnode 1 variables like '%debugFlag'") - tdSql.checkRows(23) + tdSql.checkRows(24) tdSql.query("show dnode 1 variables like '____debugFlag'") tdSql.checkRows(2)