Remove old "Integ" functionality from tests (#4688)

* fixes some warnings for newer versions of VS2022

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* more warning fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* remove integ test filters from AzTest

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* remove integ test handling from AzTestRunner

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* changes integ tests of gridmate to regular tests and disables failing ones

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* removes the Integ from the EMotionFX tests, but leaves them disabled since they are failing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* removes the Integ from the HttpRequestor tests and disables it since is not passing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* changing integ tests for DISABLED, these ones are using files that are not there

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fixes linux build
gridmate tests that were Integ are now disabled

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fixes linux warnings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-10-15 08:53:26 -07:00
committed by GitHub
parent b434d29899
commit 7651ba621c
23 changed files with 381 additions and 695 deletions
@@ -7,52 +7,50 @@
*/
#include <AzTest/AzTest.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/std/smart_ptr/shared_ptr.h>
#include <AzCore/std/parallel/atomic.h>
#include <AzCore/std/parallel/condition_variable.h>
#include "HttpRequestManager.h"
class Integ_HttpTest
: public ::testing::Test
class HttpTest
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
HttpRequestor::ManagerPtr m_httpRequestManager;
// to wait for test to complete
AZStd::mutex m_requestMutex;
AZStd::condition_variable m_requestConditionVar;
AZStd::string resultData;
AZStd::atomic<Aws::Http::HttpResponseCode> resultCode;
Integ_HttpTest()
{
m_httpRequestManager = AZStd::make_shared<HttpRequestor::Manager>();
resultCode = Aws::Http::HttpResponseCode::REQUEST_NOT_MADE;
resultData = "{}";
AZStd::unique_lock<AZStd::mutex> lock(m_requestMutex);
m_requestConditionVar.wait_for(lock, AZStd::chrono::milliseconds(10));
}
virtual ~Integ_HttpTest()
{
m_httpRequestManager.reset();
}
};
TEST_F(Integ_HttpTest, HttpRequesterTest)
TEST_F(HttpTest, DISABLED_HttpRequesterTest)
{
m_httpRequestManager->AddTextRequest(HttpRequestor::TextParameters("https://httpbin.org/ip", Aws::Http::HttpMethod::HTTP_GET, [this](const AZStd::string & data, Aws::Http::HttpResponseCode code)
{
resultData = data;
resultCode = code;
m_requestConditionVar.notify_all();
}));
HttpRequestor::Manager httpRequestManager;
AZStd::unique_lock<AZStd::mutex> lock(m_requestMutex);
m_requestConditionVar.wait_for(lock, AZStd::chrono::milliseconds(5000));
// to wait for test to complete
AZStd::mutex requestMutex;
AZStd::condition_variable requestConditionVar;
AZStd::string resultData = {};
AZStd::atomic<Aws::Http::HttpResponseCode> resultCode = Aws::Http::HttpResponseCode::REQUEST_NOT_MADE;
{
AZStd::unique_lock<AZStd::mutex> lock(requestMutex);
requestConditionVar.wait_for(lock, AZStd::chrono::milliseconds(10));
}
httpRequestManager.AddTextRequest(
HttpRequestor::TextParameters("https://httpbin.org/ip",
Aws::Http::HttpMethod::HTTP_GET,
[&resultData, &resultCode, &requestConditionVar](const AZStd::string& data, Aws::Http::HttpResponseCode code)
{
resultData = data;
resultCode = code;
requestConditionVar.notify_all();
}
)
);
{
AZStd::unique_lock<AZStd::mutex> lock(requestMutex);
requestConditionVar.wait_for(lock, AZStd::chrono::milliseconds(5000));
}
EXPECT_NE(Aws::Http::HttpResponseCode::REQUEST_NOT_MADE, resultCode);
}