From 7aff3d0842475de4b0bb3bc33d5b4cc86a056623 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Oct 2009 11:32:45 -0400 Subject: Disabling dubious getHostName() test as explained in comments --- indra/llmessage/tests/llhost_test.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/llmessage/tests/llhost_test.cpp') diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index 5dc9ce42ee..ebe61fcad3 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -166,7 +166,21 @@ namespace tut // the main domain name and not do the exact compare std::string hostname = host.getHostName(); - ensure("getHostName failed", hostname.find(hostStr) != std::string::npos); +/*==========================================================================*| + // nat 2009-10-20: not sure this ensure() is such a good idea, at + // least with "google.com". The logic below is failing for me with: + // set 'google.com'; reported 'yx-in-f100.1e100.net' + // Disabling test until we can replace it with something more robust. + try + { + ensure("getHostName failed", hostname.find(hostStr) != std::string::npos); + } + catch (const std::exception&) + { + std::cerr << "set '" << hostStr << "'; reported '" << hostname << "'" << std::endl; + throw; + } +|*==========================================================================*/ } // setHostByName for dotted IP -- cgit v1.2.3 From b0dccf883ad67e43b9fac5bc81f7b79bf9c07f8c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Oct 2009 15:24:21 -0400 Subject: skip() failing test rather than silently commenting out --- indra/llmessage/tests/llhost_test.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/llmessage/tests/llhost_test.cpp') diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index 4c9e75456a..e0c562dbf4 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -157,6 +157,7 @@ namespace tut template<> template<> void host_object::test<9>() { + skip("setHostByName(\"google.com\"); getHostName() -> (e.g.) \"yx-in-f100.1e100.net\""); std::string hostStr = "google.com"; LLHost host; host.setHostByName(hostStr); @@ -166,11 +167,6 @@ namespace tut // the main domain name and not do the exact compare std::string hostname = host.getHostName(); -/*==========================================================================*| - // nat 2009-10-20: not sure this ensure() is such a good idea, at - // least with "google.com". The logic below is failing for me with: - // set 'google.com'; reported 'yx-in-f100.1e100.net' - // Disabling test until we can replace it with something more robust. try { ensure("getHostName failed", hostname.find(hostStr) != std::string::npos); @@ -180,7 +176,6 @@ namespace tut std::cerr << "set '" << hostStr << "'; reported '" << hostname << "'" << std::endl; throw; } -|*==========================================================================*/ } // setHostByName for dotted IP -- cgit v1.2.3 From 0dce9862d20bf691d97114fc977521a499824569 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 22 Oct 2009 10:37:57 -0400 Subject: Fix broken test compile. It looks as though someone tried to reactivate the skip()ped test by replacing "google.com" with "linux.org" and deleting the skip() call. Unfortunately the edit went wrong: the instance of "google.com" in the skip() call was replaced, and the line declaring hostStr = "google.com" was deleted. Removing the local hostStr variable broke the compile. (Possible merge glitch?) On the above assumption, I commented out the skip() call, reinstated the hostStr declaration and replaced "google.com" with "linux.org" therein. --- indra/llmessage/tests/llhost_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llmessage/tests/llhost_test.cpp') diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index f7e7eee88b..7e5c3a117b 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -157,7 +157,8 @@ namespace tut template<> template<> void host_object::test<9>() { - skip("setHostByName(\"linux.org\"); getHostName() -> (e.g.) \"yx-in-f100.1e100.net\""); +// skip("setHostByName(\"google.com\"); getHostName() -> (e.g.) \"yx-in-f100.1e100.net\""); + std::string hostStr = "linux.org"; LLHost host; host.setHostByName(hostStr); -- cgit v1.2.3