You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/02/23 16:35:56 UTC

[GitHub] [geode-native] pdxcodemonkey commented on a change in pull request #750: GEODE-8949: Improves test stability

pdxcodemonkey commented on a change in pull request #750:
URL: https://github.com/apache/geode-native/pull/750#discussion_r581154221



##########
File path: CMakeLists.txt
##########
@@ -139,13 +137,8 @@ string(REGEX REPLACE " " "" IGNORED_FULL "${IGNORED_FULL}")
 
 list(APPEND CPACK_SOURCE_IGNORE_FILES ${IGNORED_FULL})
 
-if(CMAKE_GENERATOR MATCHES Win64*)
-  set(CMAKE_GENERATOR_TOOLSET "host=x64")
-else()
-  set(CMAKE_GENERATOR_TOOLSET )
-endif()
-

Review comment:
       Does this mean we can stop specifying `-Thost=x64` on the config command line?
   

##########
File path: clicache/integration-test/CMakeLists.txt
##########
@@ -13,108 +13,110 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project(nativeclient.tests.clicache)
+project(Apache.Geode.Client.UnitTests CSharp )
 
-set (NUNIT "C:\\Program Files (x86)\\NUnit 2.6.4")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config ${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
 
-if (64 EQUAL ${BUILD_BITS})
-  set (NUNIT_CONSOLE "nunit-console")
-else()
-  set (NUNIT_CONSOLE "nunit-console-x86")
-endif()
+file(GLOB_RECURSE SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
+file(GLOB_RECURSE XML_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.xml")
+set(RESOURCES
+  ${XML_SOURCE}
+  geode.properties.mixed
+  geode.properties.nativeclient
+  system.properties
+)
+
+add_library(Apache.Geode.Client.UnitTests SHARED
+  NUnitTestAddTests.ps1
+  packages.config
+  test.runsettings.in
+  ${SOURCE}
+  ${RESOURCES}
+)
 
+source_group("Source Files" FILES "${SOURCE}")
+source_group("Resource Files" FILES ${RESOURCES})
 
-foreach(var CMAKE_CURRENT_SOURCE_DIR CMAKE_SOURCE_DIR CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR)
-  file(TO_NATIVE_PATH ${${var}} ${var}_NATIVE)
-endforeach()
+set_source_files_properties(
+  ${RESOURCES}
+  PROPERTIES
+    VS_COPY_TO_OUT_DIR PreserveNewest
+    VS_TOOL_OVERRIDE None
+)
+
+target_link_libraries(Apache.Geode.Client.UnitTests
+  PUBLIC
+    Apache.Geode
+    DUnitFramework
+    NewTestObject
+    PdxClassLibrary
+    PdxVersion1Lib
+    PdxVersion2Lib
+    QueryWrapper
+    SecurityUtil
+)
 
-file(GLOB_RECURSE CSPROJECTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.csproj.in")
-if(EXISTS "${STRONG_NAME_KEY}")
-  set(STRONG_NAME_KEY_ENABLED true)
+set_target_properties(Apache.Geode.Client.UnitTests PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE "Apache.Geode.Client.UnitTests"
+  VS_GLOBAL_TreatWarningsAsErrors False
+  VS_GLOBAL_IsTestProject True
+  VS_GLOBAL_TestProjectType UnitTest
+  VS_GLOBAL_RunSettingsFilePath "\$(MSBuildProjectDirectory)\\test.runsettings"
+  VS_GLOBAL_PROJECT_TYPES "{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"

Review comment:
       Should I be concerned about dropping random GUIDs into CMake config files?

##########
File path: clicache/integration-test/CacheHelperN.cs
##########
@@ -2143,14 +2147,23 @@ static int ExecuteGfsh(string command)
           }
         }
 
-        //process.CancelOutputRead();
-        //process.CancelOutputRead();
-
         Util.Log("ExecuteGfsh: Exited {0}", process.Id);
         return process.ExitCode;
       }
     }
 
+    public static void CloseAndIgnore(StreamReader streamRead)
+    {
+      try
+      {
+        streamRead.Close();
+      } 
+      catch (Exception)
+      {
+        // ignored

Review comment:
       I take it this was the site of the `AppDomainUnloadedException`?

##########
File path: tests/cli/NewFwkLib/Utils.cs
##########
@@ -1,1457 +0,0 @@
-/*

Review comment:
       Was this whole `NewFwkLib` directory/project unused, then?

##########
File path: clicache/integration-test/DistributedSystemTests.cs
##########
@@ -1,136 +0,0 @@
-/*

Review comment:
       Awesome, deleting code *rules*!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org