[geode-native] branch develop updated (18f88e863 -> d649264b9)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git from 18f88e863 GEODE-10218: Allow server debug (#954) add d649264b9 GEODE-10218: Allow server debug (#971) No new revisions were added by this update. Summary of changes: clicache/integration-test2/Cluster.cs| 6 ++ clicache/integration-test2/SerializationTests.cs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-)
[geode-native] branch develop updated: GEODE-10218: Allow server debug (#954)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 18f88e863 GEODE-10218: Allow server debug (#954) 18f88e863 is described below commit 18f88e8636ec2248a2e8819077ea5b5343b37fb0 Author: Michael Martell AuthorDate: Thu May 12 07:08:20 2022 -0700 GEODE-10218: Allow server debug (#954) * Support DebugAgent in clicache tests * Support DebugAgent in cppcache tests * Fix StartLocators bug * Use builder pattern in Cluster, Locator and Server classes --- clicache/integration-test2/Cluster.cs | 71 +++-- clicache/integration-test2/Gfsh.cs| 14 +++- clicache/integration-test2/GfshTest.cs| 40 +++--- cppcache/integration/framework/Cluster.cpp| 55 +- cppcache/integration/framework/Cluster.h | 7 ++ cppcache/integration/framework/Gfsh.cpp | 21 ++ cppcache/integration/framework/Gfsh.h | 6 ++ cppcache/integration/test/AllowAttachTest.cpp | 105 ++ cppcache/integration/test/CMakeLists.txt | 1 + 9 files changed, 284 insertions(+), 36 deletions(-) diff --git a/clicache/integration-test2/Cluster.cs b/clicache/integration-test2/Cluster.cs index 7d2639ccc..5e24e711f 100644 --- a/clicache/integration-test2/Cluster.cs +++ b/clicache/integration-test2/Cluster.cs @@ -33,6 +33,7 @@ namespace Apache.Geode.Client.IntegrationTests private bool started_; private List locators_; private string name_; +private bool useDebugAgent_ = false; internal int jmxManagerPort = Framework.FreeTcpPort(); internal string keyStore_ = Config.SslServerKeyPath + "/server_keystore_chained.jks"; internal string keyStorePassword_ = "apachegeode"; @@ -62,6 +63,13 @@ namespace Apache.Geode.Client.IntegrationTests locatorCount_ = locatorCount; serverCount_ = serverCount; locators_ = new List(); +useDebugAgent_ = false; +} + +public Cluster withDebugAgent() +{ + useDebugAgent_ = true; + return this; } private bool StartLocators() @@ -70,8 +78,19 @@ namespace Apache.Geode.Client.IntegrationTests for (var i = 0; i < locatorCount_; i++) { -var locator = new Locator(this, new List(), -name_ + "/locator/" + i.ToString(), i == 0); +var locator = new Locator(this, locators_, +name_ + "/locator/" + i.ToString()); + +if (i == 0) +{ + locator.withJmxManager(); +} + +if (useDebugAgent_) +{ +locator.withDebugAgent(); +} + locators_.Add(locator); if (locator.Start() != 0 ) { success = false; @@ -89,6 +108,12 @@ namespace Apache.Geode.Client.IntegrationTests { var server = new Server(this, locators_, name_ + "/server/" + i.ToString()); + +if (useDebugAgent_) +{ + server.withDebugAgent(); +} + var localResult = server.Start(); if (localResult != 0) { @@ -170,17 +195,31 @@ namespace Apache.Geode.Client.IntegrationTests private List locators_; private bool started_; private bool startJmxManager_; +private bool useDebugAgent_; -public Locator(Cluster cluster, List locators, string name, bool startJmxManager) +public Locator(Cluster cluster, List locators, string name) { cluster_ = cluster; locators_ = locators; -name_ = name; -startJmxManager_ = startJmxManager; var address = new Address(); address.address = "localhost"; address.port = Framework.FreeTcpPort(); Address = address; +name_ = name; +startJmxManager_ = false; +useDebugAgent_ = false; +} + +public Locator withJmxManager() +{ +startJmxManager_ = true; +return this; +} + +public Locator withDebugAgent() +{ +useDebugAgent_ = true; +return this; } public Address Address { get; private set; } @@ -201,6 +240,12 @@ namespace Apache.Geode.Client.IntegrationTests .withJmxManagerPort(cluster_.jmxManagerPort) .withJmxManagerStart(startJmxManager_) .withHttpServicePort(0); + +if (useDebugAgent_)
[geode-native] branch develop updated: GEODE-10227: Remove redundant sendRequestForChunkedResponse (#957)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 1d9a2cc5f GEODE-10227: Remove redundant sendRequestForChunkedResponse (#957) 1d9a2cc5f is described below commit 1d9a2cc5feb72f3c5d2caa97f3208a381c04afd6 Author: Michael Martell AuthorDate: Tue Apr 19 21:57:44 2022 -0700 GEODE-10227: Remove redundant sendRequestForChunkedResponse (#957) * Remove redundant sendRequestForChunkedResponse * Remove vestigial comment --- cppcache/src/TcrEndpoint.cpp | 53 +++- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/cppcache/src/TcrEndpoint.cpp b/cppcache/src/TcrEndpoint.cpp index dd79756e1..aab41b9fe 100644 --- a/cppcache/src/TcrEndpoint.cpp +++ b/cppcache/src/TcrEndpoint.cpp @@ -754,42 +754,25 @@ GfErrType TcrEndpoint::sendRequestConn(const TcrMessage& request, // TcrMessage * req = const_cast(); LOGDEBUG("TcrEndpoint::sendRequestConn = %p", m_baseDM); if (m_baseDM != nullptr) m_baseDM->beforeSendingRequest(request, conn); - if (((type == TcrMessage::EXECUTE_FUNCTION || + if (type == TcrMessage::REGISTER_INTEREST_LIST || + type == TcrMessage::REGISTER_INTEREST || type == TcrMessage::QUERY || + type == TcrMessage::QUERY_WITH_PARAMETERS || + type == TcrMessage::GET_ALL_70 || + type == TcrMessage::GET_ALL_WITH_CALLBACK || type == TcrMessage::PUTALL || + type == TcrMessage::PUT_ALL_WITH_CALLBACK || + type == TcrMessage::REMOVE_ALL || + ((type == TcrMessage::EXECUTE_FUNCTION || type == TcrMessage::EXECUTE_REGION_FUNCTION) && - (request.hasResult() & 2))) { -conn->sendRequestForChunkedResponse(request, request.getMsgLength(), reply, -request.getTimeout(), -reply.getTimeout()); - } else if (type == TcrMessage::REGISTER_INTEREST_LIST || - type == TcrMessage::REGISTER_INTEREST || - type == TcrMessage::QUERY || - type == TcrMessage::QUERY_WITH_PARAMETERS || - type == TcrMessage::GET_ALL_70 || - type == TcrMessage::GET_ALL_WITH_CALLBACK || - type == TcrMessage::PUTALL || - type == TcrMessage::PUT_ALL_WITH_CALLBACK || - type == TcrMessage::REMOVE_ALL || - ((type == TcrMessage::EXECUTE_FUNCTION || - type == TcrMessage::EXECUTE_REGION_FUNCTION) && - (request.hasResult() & 2)) || - type == - TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP || // This is -// kept -// aside as -// server -// always -// sends -// chunked -// response. - type == TcrMessage::EXECUTECQ_MSG_TYPE || - type == TcrMessage::STOPCQ_MSG_TYPE || - type == TcrMessage::CLOSECQ_MSG_TYPE || - type == TcrMessage::KEY_SET || - type == TcrMessage::CLOSECLIENTCQS_MSG_TYPE || - type == TcrMessage::GETCQSTATS_MSG_TYPE || - type == TcrMessage::MONITORCQ_MSG_TYPE || - type == TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE || - type == TcrMessage::GETDURABLECQS_MSG_TYPE) { + (request.hasResult() & 2)) || + type == TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP || + type == TcrMessage::EXECUTECQ_MSG_TYPE || + type == TcrMessage::STOPCQ_MSG_TYPE || + type == TcrMessage::CLOSECQ_MSG_TYPE || type == TcrMessage::KEY_SET || + type == TcrMessage::CLOSECLIENTCQS_MSG_TYPE || + type == TcrMessage::GETCQSTATS_MSG_TYPE || + type == TcrMessage::MONITORCQ_MSG_TYPE || + type == TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE || + type == TcrMessage::GETDURABLECQS_MSG_TYPE) { conn->sendRequestForChunkedResponse(request, request.getMsgLength(), reply, request.getTimeout(), reply.getTimeout());
[geode-native] branch develop updated: GEODE-9921: Rename .NET to .NET Framework (#960)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 36f00a28b GEODE-9921: Rename .NET to .NET Framework (#960) 36f00a28b is described below commit 36f00a28b83f262fe35bb2bff5de28acf84e25ed Author: Max Hufnagel AuthorDate: Mon Apr 18 07:10:52 2022 -0700 GEODE-9921: Rename .NET to .NET Framework (#960) --- docs/geode-native-book-dotnet/config.yml | 6 ++-- .../about-client-users-guide.html.md.erb | 4 +-- .../client-cache-ref.html.md.erb | 4 +-- .../configuring/config-client-cache.html.md.erb| 2 +- .../configuring/sysprops.html.md.erb | 2 +- .../continuous-queries.html.md.erb | 4 +-- .../function-execution.html.md.erb | 8 ++--- .../app-dev-walkthrough-dotnet.html.md.erb | 12 .../getting-started-nc-client.html.md.erb | 4 +-- .../getting-started/put-get-example.html.md.erb| 11 --- .../config-durable-reconnect.html.md.erb | 2 +- .../using-queue-conflation.html.md.erb | 2 +- .../regions/regions.html.md.erb| 2 +- .../registering-interest-for-entries.html.md.erb | 2 +- .../remote-queries.html.md.erb | 2 +- .../security/authentication.html.md.erb| 2 +- .../serialization/data-serialization.html.md.erb | 15 - .../dotnet-pdx-autoserializer.html.md.erb | 36 -- .../dotnet-pdx-serialization.html.md.erb | 32 ++- .../pdx-serializable-examples.html.md.erb | 12 .../serialize-using-ipdxserializable.html.md.erb | 2 +- .../transactions.html.md.erb | 8 ++--- 22 files changed, 91 insertions(+), 83 deletions(-) diff --git a/docs/geode-native-book-dotnet/config.yml b/docs/geode-native-book-dotnet/config.yml index 1f2cdb982..643eb5979 100644 --- a/docs/geode-native-book-dotnet/config.yml +++ b/docs/geode-native-book-dotnet/config.yml @@ -35,11 +35,11 @@ template_variables: dotnetapiref_version: dotnetapiref # product_language: dotnet - client_name: Geode Native Client for .NET + client_name: Geode Native Client for .NET Framework min_java_update: 121 support_url: http://geode.apache.org/community product_url: http://geode.apache.org - book_title: Apache Geode Native .NET Documentation + book_title: Apache Geode Native .NET Framework Documentation book_header_img: /images/Apache_Geode_logo_symbol_white.png support_link: http://geode.apache.org/community; target="_blank">Community support_call_to_action: http://geode.apache.org/community; target="_blank">Need Help? @@ -47,7 +47,7 @@ template_variables: product_link: http://geode.apache.org;>Back to Product Page domain_name: apache.org book_title_short: Geode Native .NET Docs - local_header_title: Apache Geode Native .NET + local_header_title: Apache Geode Native .NET Framework local_header_img: /images/Apache_Geode_logo_symbol.png serverman: https://geode.apache.org/docs/guide/latest geodeman: https://geode.apache.org/docs/guide/latest diff --git a/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb b/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb index b7876abf9..6f9511f27 100644 --- a/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb +++ b/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb @@ -21,12 +21,12 @@ This documentation describes the Apache Geode Native Client version <%=vars.prod Source files are available from the [Apache Geode-Native Github repository](https://github.com/apache/geode-native) and instructions on how to build this documentation are available in the project README file found at that location. -The Apache Geode Native Client is a library that provides access for C++ and Microsoft® .NET™ clients to an Apache Geode cluster. +The Apache Geode Native Client is a library that provides access for C++ and Microsoft® .NET™ Framework clients to an Apache Geode cluster. See the API docs for API details: - [C++ API docs](/<%=vars.cppapiref_version%>/hierarchy.html) - - [.NET API docs](/<%=vars.dotnetapiref_version%>/hierarchy.html) + - [.NET Framework API docs](/<%=vars.dotnetapiref_version%>/hierarchy.html) See the [_<%=vars.product_name_long%> User Guide_](<%=vars.serverman%>/about_<%=vars.product_name.downcase%>.html) for information regarding the server. diff --git a/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb b/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb index 35bcbbd3b..bfa74c8dc 100644 --- a/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb +++ b/docs/geode-na
[geode-native] branch GEODE-10058-rm-netcore-and-cbindings created (now 1aa67f8)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-10058-rm-netcore-and-cbindings in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 1aa67f8 Remove netcore tests from CI No new revisions were added by this update.
[geode-native] branch develop updated: Fix regexes in server messages (#944)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 2e9b6b7 Fix regexes in server messages (#944) 2e9b6b7 is described below commit 2e9b6b7c5431f19a04c13c6d6b51f6fae62cbb86 Author: Blake Bender AuthorDate: Mon Mar 7 11:49:00 2022 -0800 Fix regexes in server messages (#944) --- tools/gnmsg/server_message_decoder.py | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tools/gnmsg/server_message_decoder.py b/tools/gnmsg/server_message_decoder.py index 38b92e6..6b510a5 100644 --- a/tools/gnmsg/server_message_decoder.py +++ b/tools/gnmsg/server_message_decoder.py @@ -16,9 +16,7 @@ # limitations under the License. import re import struct -import sys -from collections import OrderedDict from dateutil import parser from server_messages import parse_server_message @@ -52,27 +50,27 @@ class ServerMessageDecoder(DecoderBase): self.threads_connections_ = {} self.connection_to_tid_expression_ = re.compile( - r"(\d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+)\]\s*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*(.+)" + r"(\d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*(.+)" ) self.trace_header_with_pointer_expression_ = re.compile( -r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+)\]\s*TcrConnection::readMessage\(([\d|a-f|A-F|x|X]+)\):.*received header from endpoint.*bytes:\s*(.+)" +r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::readMessage\(([\d|a-f|A-F|x|X]+)\):.*received header from endpoint.*bytes:\s*(.+)" ) self.trace_header_without_pointer_expression_ = re.compile( -r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+([\d|a-f|A-F|x|X]+)\]\s*TcrConnection::readMessage:\s*received header from endpoint.*bytes:\s*(.+)" +r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::readMessage:\s*received header from endpoint.*bytes:\s*(.+)" ) self.trace_header_v911_expression_ = re.compile( -r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readMessage: received header from endpoint.*bytes:\s*([\d| ]+)" +r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+).*\]\s*TcrConnection::readMessage: received header from endpoint.*bytes:\s*([\d| ]+)" ) self.receive_trace_body_expression_ = re.compile( -":\d+\s+([\d|a-f|A-F|x|X]+)\]\s*TcrConnection::readMessage: received message body from endpoint.*bytes:\s*(.+)" +":\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::readMessage: received message body from endpoint.*bytes:\s*(.+)" ) self.security_trace_expression_ = re.compile( -r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrMessage::addSecurityPart\s*\[(0x[\d|a-f|A-F]*).*length\s*=\s*(\d+)\s*,\s*encrypted\s+ID\s*=\s*(.+)" +r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+).*\]\s*TcrMessage::addSecurityPart\s*\[(0x[\d|a-f|A-F]*).*length\s*=\s*(\d+)\s*,\s*encrypted\s+ID\s*=\s*(.+)" ) self.response_header_with_pointer_expression_ = re.compile( @@ -358,9 +356,7 @@ class ServerMessageDecoder(DecoderBase): pass elif self.get_receive_trace_parts(line, parts): tid = parts[1] -last_header = OrderedDict[ -"Timestamp" : parts[0], "tid":tid, "Connection" : parts[2] -] +last_header = {"Timestamp": parts[0], "tid": tid, "Connection": parts[2]} message_bytes = parts[3] self.headers_[tid] = last_header if (
[geode-native] branch develop updated: Gnmsg parse server handshake response (#939)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new dcb1e9e Gnmsg parse server handshake response (#939) dcb1e9e is described below commit dcb1e9e7d22b517e84c5a8bc44fe9d5d19a103c9 Author: Blake Bender AuthorDate: Mon Mar 7 07:55:03 2022 -0800 Gnmsg parse server handshake response (#939) * Add timestamp, tid, direction, and Type to server handshake request * Parsing server handshake response in gnmsg - Added logging to TcrConnection to dump handshake response bytes - Cleaned up some code in TcrConnection::initTcrConnection, to help clarify what's going on - Renamed TcrConnection member variables to conform to standard --- cppcache/src/TcrConnection.cpp| 289 -- cppcache/src/TcrConnection.hpp| 34 ++-- tools/gnmsg/client_message_decoder.py | 25 +-- tools/gnmsg/gnmsg.py | 18 +- tools/gnmsg/handshake_acceptance_codes.py | 26 +++ tools/gnmsg/handshake_decoder.py | 121 +++-- tools/gnmsg/read_values.py| 11 +- tools/gnmsg/server_message_decoder.py | 9 +- 8 files changed, 343 insertions(+), 190 deletions(-) diff --git a/cppcache/src/TcrConnection.cpp b/cppcache/src/TcrConnection.cpp index 3fb09ba..d35c94d 100644 --- a/cppcache/src/TcrConnection.cpp +++ b/cppcache/src/TcrConnection.cpp @@ -26,6 +26,7 @@ #include "ClientProxyMembershipID.hpp" #include "Connector.hpp" #include "DistributedSystemImpl.hpp" +#include "FunctionMacros.hpp" #include "TcpConn.hpp" #include "TcpSslConn.hpp" #include "TcrConnectionManager.hpp" @@ -35,6 +36,8 @@ #include "Utils.hpp" #include "Version.hpp" +INIT_GNFN("TcrConnection") + #define throwException(ex)\ do {\ LOGFINEST(ex.getName() + ": " + ex.getMessage()); \ @@ -86,16 +89,16 @@ const int64_t INITIAL_CONNECTION_ID = 26739; struct FinalizeProcessChunk { private: - apache::geode::client::TcrMessage& m_reply; - uint16_t m_endpointMemId; + apache::geode::client::TcrMessage& reply_; + uint16_t endpointMemId_; public: FinalizeProcessChunk(apache::geode::client::TcrMessageReply& reply, uint16_t endpointMemId) - : m_reply(reply), m_endpointMemId(endpointMemId) {} + : reply_(reply), endpointMemId_(endpointMemId) {} ~FinalizeProcessChunk() noexcept(false) { // Enqueue a nullptr chunk indicating a wait for processing to complete. -m_reply.processChunk(std::vector(), 0, m_endpointMemId); +reply_.processChunk(std::vector(), 0, endpointMemId_); } }; } // namespace @@ -106,44 +109,44 @@ namespace client { TcrConnection::TcrConnection(const TcrConnectionManager& connectionManager) : connectionId(0), - m_connectionManager(connectionManager), - m_expiryTimeVariancePercentage{expiryTimeVariancePercentage()}, - m_hasServerQueue(NON_REDUNDANT_SERVER), - m_queueSize(0), - m_port(0), + connectionManager_(connectionManager), + expiryTimeVariancePercentage_{expiryTimeVariancePercentage()}, + hasServerQueue_(NON_REDUNDANT_SERVER), + queueSize_(0), + port_(0), chunks_process_semaphore_(0), - m_isBeingUsed(false), - m_isUsed(0), - m_poolDM(nullptr) {} + isBeingUsed_(false), + isUsed_(0), + poolDM_(nullptr) {} bool TcrConnection::initTcrConnection( std::shared_ptr endpointObj, synchronized_set>& ports, bool isClientNotification, bool isSecondary, std::chrono::microseconds connectTimeout) { - m_endpointObj = endpointObj; - m_poolDM = dynamic_cast(m_endpointObj->getPoolHADM()); - m_hasServerQueue = NON_REDUNDANT_SERVER; - m_queueSize = 0; - m_lastAccessed = m_creationTime = std::chrono::steady_clock::now(); + endpointObj_ = endpointObj; + poolDM_ = dynamic_cast(endpointObj_->getPoolHADM()); + hasServerQueue_ = NON_REDUNDANT_SERVER; + queueSize_ = 0; + lastAccessed_ = creationTime_ = std::chrono::steady_clock::now(); connectionId = INITIAL_CONNECTION_ID; - auto cacheImpl = m_poolDM->getConnectionManager().getCacheImpl(); + auto cacheImpl = poolDM_->getConnectionManager().getCacheImpl(); const auto& distributedSystem = cacheImpl->getDistributedSystem(); const auto& sysProp = distributedSystem.getSystemProperties(); bool isPool = false; - m_isBeingUsed = false; + isBeingUsed_ = false; // Precondition: // 1. isSecondary ==> isClientNotification // Create TcpConn object which manages a socket connection with the endpoint. if (endpointObj &&
[geode-native] branch develop updated: Add shorts and longs to read_cacheable (#940)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 6995014 Add shorts and longs to read_cacheable (#940) 6995014 is described below commit 6995014767e5e9ee6de684c91cebc9cea62ffe74 Author: Michael Martell AuthorDate: Thu Mar 3 07:47:53 2022 -0800 Add shorts and longs to read_cacheable (#940) --- tools/gnmsg/read_values.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/gnmsg/read_values.py b/tools/gnmsg/read_values.py index 94561a5..fc8f4ea 100644 --- a/tools/gnmsg/read_values.py +++ b/tools/gnmsg/read_values.py @@ -207,9 +207,15 @@ def read_cacheable(message_bytes, offset): message_bytes, offset, read_byte_value ) value["Value"] = "False" if bool_val == 0 else "True" +elif value["DSCode"] == "CacheableInt16": +(int_val, offset) = call_reader_function(message_bytes, offset, read_short_value) +value["Value"] = int_val elif value["DSCode"] == "CacheableInt32": (int_val, offset) = call_reader_function(message_bytes, offset, read_int_value) value["Value"] = int_val +elif value["DSCode"] == "CacheableInt64": +(int_val, offset) = call_reader_function(message_bytes, offset, read_long_value) +value["Value"] = int_val elif value["DSCode"] == "NullObj": # Gah! Nasty little bug in the protocol here. NC writes '1' in the # size field for a NullObj, but the payload is actually ZERO bytes,
[geode-native] branch develop updated: GEODE-10085: Don't start JmxManager if already running (#936)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 04d18c3 GEODE-10085: Don't start JmxManager if already running (#936) 04d18c3 is described below commit 04d18c380dea2bde30d3876de68f958513902b82 Author: Michael Martell AuthorDate: Wed Mar 2 07:48:48 2022 -0800 GEODE-10085: Don't start JmxManager if already running (#936) * Don't start JmxManager if already started * Fix broken StartLocators() and StartServers() --- clicache/integration-test2/Cluster.cs | 14 ++ cppcache/integration/framework/Cluster.cpp | 10 +++--- cppcache/integration/framework/Cluster.h | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/clicache/integration-test2/Cluster.cs b/clicache/integration-test2/Cluster.cs index f4deaa2..7d2639c 100644 --- a/clicache/integration-test2/Cluster.cs +++ b/clicache/integration-test2/Cluster.cs @@ -71,9 +71,12 @@ namespace Apache.Geode.Client.IntegrationTests for (var i = 0; i < locatorCount_; i++) { var locator = new Locator(this, new List(), -name_ + "/locator/" + i.ToString()); +name_ + "/locator/" + i.ToString(), i == 0); locators_.Add(locator); -success = (locator.Start() == 0); +if (locator.Start() != 0 ) { +success = false; +break; +} } return success; } @@ -90,6 +93,7 @@ namespace Apache.Geode.Client.IntegrationTests if (localResult != 0) { success = false; +break; } } return success; @@ -165,12 +169,14 @@ namespace Apache.Geode.Client.IntegrationTests private string name_; private List locators_; private bool started_; +private bool startJmxManager_; -public Locator(Cluster cluster, List locators, string name) +public Locator(Cluster cluster, List locators, string name, bool startJmxManager) { cluster_ = cluster; locators_ = locators; name_ = name; +startJmxManager_ = startJmxManager; var address = new Address(); address.address = "localhost"; address.port = Framework.FreeTcpPort(); @@ -193,7 +199,7 @@ namespace Apache.Geode.Client.IntegrationTests .withPort(Address.port) .withMaxHeap("256m") .withJmxManagerPort(cluster_.jmxManagerPort) -.withJmxManagerStart(true) +.withJmxManagerStart(startJmxManager_) .withHttpServicePort(0); if (cluster_.UseSSL) { diff --git a/cppcache/integration/framework/Cluster.cpp b/cppcache/integration/framework/Cluster.cpp index ff92cd1..7a69b7b 100644 --- a/cppcache/integration/framework/Cluster.cpp +++ b/cppcache/integration/framework/Cluster.cpp @@ -73,7 +73,7 @@ Locator::Locator(Locator &) const LocatorAddress ::getAddress() const { return locatorAddress_; } -void Locator::start() { +void Locator::start(bool startJmxManager) { if (started_) return; auto safeName = name_; @@ -109,7 +109,7 @@ void Locator::start() { .withClasspath(cluster_.getClasspath()) .withSecurityManager(cluster_.getSecurityManager()) .withPreferIPv6(cluster_.getUseIPv6()) - .withJmxManagerStart(true); + .withJmxManagerStart(startJmxManager); if (cluster_.useSsl()) { locator.withConnect(false) @@ -485,8 +485,12 @@ void Cluster::startServers() { void Cluster::startLocators() { std::vector> futures; + bool startJmxManager = true; for (auto : locators_) { -futures.push_back(std::async(std::launch::async, [&] { locator.start(); })); +futures.push_back(std::async(std::launch::async, [&, startJmxManager] { + locator.start(startJmxManager); +})); +startJmxManager = false; } // TODO hack until there is a way to either tell servers to retry or wait diff --git a/cppcache/integration/framework/Cluster.h b/cppcache/integration/framework/Cluster.h index 5085ff5..333297d 100644 --- a/cppcache/integration/framework/Cluster.h +++ b/cppcache/integration/framework/Cluster.h @@ -56,7 +56,7 @@ class Locator { const LocatorAddress () const; - void start(); + void start(bool startJmxManager); void stop();
[geode-native] branch develop updated: GEODE-10073: Print bytes of ClientConnectionRequest/Response in logs (#927)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new a7dab24 GEODE-10073: Print bytes of ClientConnectionRequest/Response in logs (#927) a7dab24 is described below commit a7dab245483be28b8c7443839b10fd29c7063b03 Author: Blake Bender AuthorDate: Tue Feb 22 12:48:49 2022 -0800 GEODE-10073: Print bytes of ClientConnectionRequest/Response in logs (#927) * Print bytes of ClientConnectionRequest/Response in logs * Dump the bytes at debug log level, so we can parse * Also added parsing of these to gnmsg tool Co-authored-by: Blake Bender --- cppcache/src/FunctionMacros.hpp | 28 + cppcache/src/ThinClientLocatorHelper.cpp | 56 + tools/gnmsg/client_messages.py | 6 +- tools/gnmsg/ds_fids.py | 40 +++ tools/gnmsg/gnmsg.py | 19 --- tools/gnmsg/handshake_decoder.py | 194 +++ tools/gnmsg/modified_utf8.py | 2 +- tools/gnmsg/read_values.py | 71 ++- 8 files changed, 347 insertions(+), 69 deletions(-) diff --git a/cppcache/src/FunctionMacros.hpp b/cppcache/src/FunctionMacros.hpp new file mode 100644 index 000..03d426b --- /dev/null +++ b/cppcache/src/FunctionMacros.hpp @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once +#ifndef __INC_FUNCTIONMACROS__ +#define __INC_FUNCTIONMACROS__ + +#define INIT_GNFN(this_class) \ + namespace { \ + const auto classname = std::string(this_class); \ + } + +#define __GNFN__ (classname + "::" + __func__).c_str() + +#endif // __INC_FUNCTIONMACROS__ diff --git a/cppcache/src/ThinClientLocatorHelper.cpp b/cppcache/src/ThinClientLocatorHelper.cpp index 7d97443..d896d65 100644 --- a/cppcache/src/ThinClientLocatorHelper.cpp +++ b/cppcache/src/ThinClientLocatorHelper.cpp @@ -30,6 +30,7 @@ #include "ClientConnectionRequest.hpp" #include "ClientConnectionResponse.hpp" #include "ClientReplacementRequest.hpp" +#include "FunctionMacros.hpp" #include "LocatorListRequest.hpp" #include "LocatorListResponse.hpp" #include "QueueConnectionRequest.hpp" @@ -40,6 +41,8 @@ #include "ThinClientPoolDM.hpp" #include "Version.hpp" +INIT_GNFN("ThinClientLocatorHelper") + namespace apache { namespace geode { namespace client { @@ -129,6 +132,11 @@ std::shared_ptr ThinClientLocatorHelper::sendRequest( data.writeInt(kGossipVersion); data.writeInt(Version::current().getOrdinal()); data.writeObject(request); +LOGDEBUG( +"%s(%p): sending %d bytes to locator: %s", __GNFN__, this, +data.getBufferLength(), +Utils::convertBytesToString(data.getBuffer(), data.getBufferLength()) +.c_str()); auto sentLength = conn->send( reinterpret_cast(const_cast(data.getBuffer())), data.getBufferLength(), m_poolDM->getReadTimeout()); @@ -141,12 +149,19 @@ std::shared_ptr ThinClientLocatorHelper::sendRequest( return nullptr; } +LOGDEBUG("%s(%p): received %d bytes from locator: %s", __GNFN__, this, + receivedLength, + Utils::convertBytesToString(reinterpret_cast(buff), + receivedLength) + .c_str()); + auto di = m_poolDM->getConnectionManager().getCacheImpl()->createDataInput( reinterpret_cast(buff), receivedLength); if (di.read() == REPLY_SSL_ENABLED && !sys_prop.sslEnabled()) { - LOGERROR("SSL is enabled on locator %s, enable SSL in client as well", - location.toString().c_str()); + LOGERROR( + "%s(%p): SSL is enabled on locator %s, enable SSL in client as well", + __GNFN__, this, location.toString().c_str()); throw AuthenticationR
[geode-native] branch develop updated: GEODE-10065: Add missing colon in regexp (#926)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 06413ef GEODE-10065: Add missing colon in regexp (#926) 06413ef is described below commit 06413ef0cfb07e27f55007770496aba0ed418802 Author: Michael Martell AuthorDate: Fri Feb 18 10:36:55 2022 -0800 GEODE-10065: Add missing colon in regexp (#926) --- tools/gnmsg/handshake_decoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gnmsg/handshake_decoder.py b/tools/gnmsg/handshake_decoder.py index 9450bbb..8e7c1d3 100644 --- a/tools/gnmsg/handshake_decoder.py +++ b/tools/gnmsg/handshake_decoder.py @@ -48,7 +48,7 @@ class HandshakeDecoder(DecoderBase): } def is_handshake_trace(self, line): -expression = re.compile(r"Handshake bytes \(\d+\):\s*([0-9|a-f|A-F]+)") +expression = re.compile(r"Handshake bytes: \(\d+\):\s*([0-9|a-f|A-F]+)") match = expression.search(line) if match: return True @@ -56,7 +56,7 @@ class HandshakeDecoder(DecoderBase): return False def get_handshake_bytes(self, line): -expression = re.compile(r"Handshake bytes \(\d+\):\s*([0-9|a-f|A-F]+)") +expression = re.compile(r"Handshake bytes: \(\d+\):\s*([0-9|a-f|A-F]+)") match = expression.search(line) if match: return match.group(1)
[geode-native] branch develop updated: GEODE-10040: Increase wait timeout for gfsh (#924)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new ac9df11 GEODE-10040: Increase wait timeout for gfsh (#924) ac9df11 is described below commit ac9df11eb0b2c758a3f21a8b5f96be2788cfbd4e Author: Michael Martell AuthorDate: Wed Feb 16 10:27:23 2022 -0800 GEODE-10040: Increase wait timeout for gfsh (#924) --- clicache/integration-test/CacheHelperN.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clicache/integration-test/CacheHelperN.cs b/clicache/integration-test/CacheHelperN.cs index d97b708..a7e5a05 100644 --- a/clicache/integration-test/CacheHelperN.cs +++ b/clicache/integration-test/CacheHelperN.cs @@ -316,7 +316,7 @@ namespace Apache.Geode.Client.UnitTests private const string JavaServerStopArgs = "stop server"; private const string LocatorStartArgs = "start locator --max-heap=512m"; private const string LocatorStopArgs = "stop locator"; -private const int MaxWaitMillis = 6; +private const int MaxWaitMillis = 6*5; private static string m_testDir = null; private static Dictionary m_runningJavaServers =
[geode-native] branch GEODE-10040-increase-gfsh-wait-timeout created (now 642dbfd)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-10040-increase-gfsh-wait-timeout in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 642dbfd GEODE-10040: Increase MaxWaitMillis to 5min This branch includes the following new commits: new 642dbfd GEODE-10040: Increase MaxWaitMillis to 5min The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 01/01: GEODE-10040: Increase MaxWaitMillis to 5min
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-10040-increase-gfsh-wait-timeout in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 642dbfd613bd08e944c51cae44acb7af005bc52d Author: Mike Martell AuthorDate: Tue Feb 15 15:39:05 2022 -0800 GEODE-10040: Increase MaxWaitMillis to 5min --- clicache/integration-test/CacheHelperN.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clicache/integration-test/CacheHelperN.cs b/clicache/integration-test/CacheHelperN.cs index d97b708..a7e5a05 100644 --- a/clicache/integration-test/CacheHelperN.cs +++ b/clicache/integration-test/CacheHelperN.cs @@ -316,7 +316,7 @@ namespace Apache.Geode.Client.UnitTests private const string JavaServerStopArgs = "stop server"; private const string LocatorStartArgs = "start locator --max-heap=512m"; private const string LocatorStopArgs = "stop locator"; -private const int MaxWaitMillis = 6; +private const int MaxWaitMillis = 6*5; private static string m_testDir = null; private static Dictionary m_runningJavaServers =
[geode-native] branch develop updated (cd38c21 -> 64e728e)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git. from cd38c21 GEODE-100043: Solve TransactionCleaningTest errors (#923) add 64e728e GEODE-10004: support older geode versions (#917) No new revisions were added by this update. Summary of changes: cmake/CheckJavaClassExists.cmake | 47 tests/javaobject/CMakeLists.txt | 9 +++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 cmake/CheckJavaClassExists.cmake
[geode-native] branch develop updated: GEODE-10016: Add map of threadId to threadName (#918)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new f60277d GEODE-10016: Add map of threadId to threadName (#918) f60277d is described below commit f60277dee9a33502a8fe832f5db54a8f9543eb32 Author: Michael Martell AuthorDate: Tue Feb 8 06:48:17 2022 -0800 GEODE-10016: Add map of threadId to threadName (#918) * Save threadName to thread_local storage * Per review, get/setThreadName doesn't need tid * Add threadName in parens after tid * Update gnmsg for threadName * Move accessors to Log class * Inline threadNames instead of constants * Remove getThreadName() --- cppcache/src/ClientMetadataService.cpp | 4 +- cppcache/src/DataOutput.cpp | 5 +-- cppcache/src/DistributedSystemImpl.cpp | 37 cppcache/src/DistributedSystemImpl.hpp | 2 - cppcache/src/EvictionController.cpp | 3 +- cppcache/src/ExpiryTaskManager.cpp | 6 +-- cppcache/src/Log.cpp | 63 +++- cppcache/src/Task.hpp| 3 +- cppcache/src/ThreadPool.cpp | 5 +-- cppcache/src/statistics/HostStatSampler.cpp | 2 +- cppcache/src/statistics/PoolStatsSampler.cpp | 4 +- cppcache/src/util/Log.hpp| 2 + tools/gnmsg/client_message_decoder.py| 24 +-- 13 files changed, 84 insertions(+), 76 deletions(-) diff --git a/cppcache/src/ClientMetadataService.cpp b/cppcache/src/ClientMetadataService.cpp index 4092cf2..5600c4b 100644 --- a/cppcache/src/ClientMetadataService.cpp +++ b/cppcache/src/ClientMetadataService.cpp @@ -37,8 +37,6 @@ namespace client { const BucketStatus::clock::time_point BucketStatus::m_noTimeout{}; -const char* ClientMetadataService::NC_CMDSvcThread = "NC CMDSvcThread"; - ClientMetadataService::ClientMetadataService(ThinClientPoolDM* pool) : m_run(false), m_pool(pool), @@ -66,7 +64,7 @@ void ClientMetadataService::stop() { } void ClientMetadataService::svc() { - DistributedSystemImpl::setThreadName(NC_CMDSvcThread); + Log::setThreadName("NC CMDSvcThread"); LOGINFO("ClientMetadataService started for pool " + m_pool->getName()); diff --git a/cppcache/src/DataOutput.cpp b/cppcache/src/DataOutput.cpp index 6b234ce..ea6a071 100644 --- a/cppcache/src/DataOutput.cpp +++ b/cppcache/src/DataOutput.cpp @@ -92,10 +92,7 @@ class TSSDataOutput { static thread_local TSSDataOutput threadLocalBufferPool; }; -TSSDataOutput::TSSDataOutput() : m_buffers() { - m_buffers.reserve(10); - LOGDEBUG("DATAOUTPUT poolsize is %zu", m_buffers.size()); -} +TSSDataOutput::TSSDataOutput() : m_buffers() { m_buffers.reserve(10); } TSSDataOutput::~TSSDataOutput() { while (!m_buffers.empty()) { diff --git a/cppcache/src/DistributedSystemImpl.cpp b/cppcache/src/DistributedSystemImpl.cpp index 6606246..a7338ed 100644 --- a/cppcache/src/DistributedSystemImpl.cpp +++ b/cppcache/src/DistributedSystemImpl.cpp @@ -143,43 +143,6 @@ void DistributedSystemImpl::unregisterCliCallback(int appdomainId) { } } -void DistributedSystemImpl::setThreadName(const std::string& threadName) { - if (threadName.empty()) { -throw IllegalArgumentException("Thread name is empty."); - } - -#if defined(HAVE_pthread_setname_np) - - pthread_setname_np(threadName.c_str()); - -#elif defined(_WIN32) - - const DWORD MS_VC_EXCEPTION = 0x406D1388; - -#pragma pack(push, 8) - typedef struct tagTHREADNAME_INFO { -DWORD dwType; // Must be 0x1000. -LPCSTR szName; // Pointer to name (in user addr space). -DWORD dwThreadID; // Thread ID (-1=caller thread). -DWORD dwFlags; // Reserved for future use, must be zero. - } THREADNAME_INFO; -#pragma pack(pop) - - THREADNAME_INFO info; - info.dwType = 0x1000; - info.szName = threadName.c_str(); - info.dwThreadID = -1; - info.dwFlags = 0; - - __try { -RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), - (ULONG_PTR*)); - } __except (EXCEPTION_EXECUTE_HANDLER) { - } - -#endif -} - } // namespace client } // namespace geode } // namespace apache diff --git a/cppcache/src/DistributedSystemImpl.hpp b/cppcache/src/DistributedSystemImpl.hpp index e920e38..88b661b 100644 --- a/cppcache/src/DistributedSystemImpl.hpp +++ b/cppcache/src/DistributedSystemImpl.hpp @@ -47,8 +47,6 @@ using CliCallbackMethod = std::function; */ class DistributedSystemImpl { public: - static void setThreadName(const std::string& threadName); - /** * @brief destructor */ diff --git a/cppcache/src/EvictionController.cpp b/cppcache/src/EvictionController.cpp index 60c6646..6d9158c 100644 --- a/cppcache/src/EvictionController.cpp +++ b/cppcache
[geode-native] branch develop updated: Eliminate duplicate REGISTER_INTEREST message (#906)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 0550b0f Eliminate duplicate REGISTER_INTEREST message (#906) 0550b0f is described below commit 0550b0ff4d4040500cc52baef9297c01691011a8 Author: Blake Bender AuthorDate: Tue Jan 18 07:13:05 2022 -0800 Eliminate duplicate REGISTER_INTEREST message (#906) - first endpoint in m_redundantEndpoints was originally supposed to be left out of the for loop. This broke during a refactor roughly three years ago, moving from old-school iterator to a ranged for loop. Co-authored-by: Blake Bender --- cppcache/src/ThinClientRedundancyManager.cpp | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cppcache/src/ThinClientRedundancyManager.cpp b/cppcache/src/ThinClientRedundancyManager.cpp index ee00c55..4752c9b 100644 --- a/cppcache/src/ThinClientRedundancyManager.cpp +++ b/cppcache/src/ThinClientRedundancyManager.cpp @@ -887,7 +887,11 @@ GfErrType ThinClientRedundancyManager::sendSyncRequestRegisterInterest( TcrEndpoint* primaryEndpoint = nullptr; if (!m_redundantEndpoints.empty()) { - for (auto&& redundantEndpoint : m_redundantEndpoints) { + primaryEndpoint = m_redundantEndpoints[0]; + for (auto& redundantEndpoint : m_redundantEndpoints) { +if (redundantEndpoint == primaryEndpoint) { + continue; +} redundantEndpoint->setDM(request.getDM()); opErr = theHADM->sendSyncRequestRegisterInterestEP( request, reply, false, redundantEndpoint); @@ -895,7 +899,6 @@ GfErrType ThinClientRedundancyManager::sendSyncRequestRegisterInterest( err = opErr; } } - primaryEndpoint = m_redundantEndpoints[0]; } if ((request.getMessageType() == TcrMessage::REGISTER_INTEREST_LIST ||
[geode-native] 01/02: Modify tests for generics (wip)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9712-genericize-netcore in repository https://gitbox.apache.org/repos/asf/geode-native.git commit a5fc92096f969326da2edb10c2d81dce615d571b Author: Mike Martell AuthorDate: Wed Dec 8 15:14:07 2021 -0800 Modify tests for generics (wip) --- netcore/netcore-integration-test/CacheTest.cs | 2 +- .../netcore-integration-test/RegionFactoryTest.cs | 34 -- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/netcore/netcore-integration-test/CacheTest.cs b/netcore/netcore-integration-test/CacheTest.cs index f35d181..ececc4f 100644 --- a/netcore/netcore-integration-test/CacheTest.cs +++ b/netcore/netcore-integration-test/CacheTest.cs @@ -80,7 +80,7 @@ namespace Apache.Geode.Client.IntegrationTests { cacheFactory.PdxIgnoreUnreadFields = true; using var cache = cacheFactory.CreateCache(); Assert.NotNull(cache); - using var regionFactory = cache.CreateRegionFactory( + var regionFactory = cache.CreateRegionFactory( RegionShortcut.Proxy); // lgtm[cs / useless - assignment - to - local] Assert.NotNull(regionFactory); } diff --git a/netcore/netcore-integration-test/RegionFactoryTest.cs b/netcore/netcore-integration-test/RegionFactoryTest.cs index edac8ad..a995547 100644 --- a/netcore/netcore-integration-test/RegionFactoryTest.cs +++ b/netcore/netcore-integration-test/RegionFactoryTest.cs @@ -57,38 +57,41 @@ namespace Apache.Geode.Client.IntegrationTests { poolFactory.CreatePool("myPool"); // lgtm[cs / useless - assignment - to - local] } -private void doPutsAndGets(Region region) { +private void doPutsAndGets(IRegion region) { var fullname1 = "Robert Timmons"; var fullname2 = "Sylvia Charles"; + var car = new Dictionary() { { 1, "Ford" }, { 2, "Chevy" } }; - region.PutString(Username1, fullname1); - region.PutString(Username2, fullname2); + region.Put(Username1, fullname1); + region.Put(777, fullname2); + region.Put(888, car); - var user1 = region.GetString(Username1); - var user2 = region.GetString(Username2); + var user1 = region.Get(Username1); + var user2 = region.Get(777); + var car1 = region.Get(888); Assert.Equal(user1, fullname1); Assert.Equal(user2, fullname2); } -private void DoRemoves(Region region) { - region.Remove(Username1); - region.Remove(Username2); +private void DoRemoves(IRegion region) { + //region.Remove(Username1); + //region.Remove(Username2); - var hasUser1 = region.ContainsValueForKey(Username1); - var hasUser2 = region.ContainsValueForKey(Username2); + //var hasUser1 = region.ContainsValueForKey(Username1); + //var hasUser2 = region.ContainsValueForKey(Username2); - Assert.False(hasUser1); - Assert.False(hasUser2); + //Assert.False(hasUser1); + //Assert.False(hasUser2); } private void CreateRegionAndDoWork(IGeodeCache cache, string regionName, RegionShortcut regionType) { - using var regionFactory = cache.CreateRegionFactory(regionType); - using var region = regionFactory.CreateRegion(regionName); + var regionFactory = cache.CreateRegionFactory(regionType); + var region = regionFactory.Create(regionName); doPutsAndGets(region); - DoRemoves(region); + //DoRemoves(region); } [Fact] @@ -102,6 +105,7 @@ namespace Apache.Geode.Client.IntegrationTests { .CreatePool("myPool"); CreateRegionAndDoWork(cache, "exampleRegion", RegionShortcut.Proxy); + } [Fact]
[geode-native] 02/02: Genericize netcore-lib
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9712-genericize-netcore in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 2503eedd75c8ee9320cf48a4d01af6b4d5d65815 Author: Mike Martell AuthorDate: Wed Dec 8 15:15:39 2021 -0800 Genericize netcore-lib --- netcore/netcore-lib/Cache.cs | 113 ++-- netcore/netcore-lib/{Cache.cs => CacheInterop.cs} | 8 +- .../netcore-lib/{IRegionService.cs => IRegion.cs} | 12 ++- netcore/netcore-lib/IRegionService.cs | 8 +- netcore/netcore-lib/PoolManager.cs | 7 ++ netcore/netcore-lib/Region.cs | 117 +++-- netcore/netcore-lib/RegionFactory.cs | 44 +--- .../{RegionFactory.cs => RegionFactoryInterop.cs} | 10 +- .../netcore-lib/{Region.cs => RegionInterop.cs}| 69 +--- 9 files changed, 206 insertions(+), 182 deletions(-) diff --git a/netcore/netcore-lib/Cache.cs b/netcore/netcore-lib/Cache.cs index 200e740..064b963 100644 --- a/netcore/netcore-lib/Cache.cs +++ b/netcore/netcore-lib/Cache.cs @@ -20,59 +20,29 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Apache.Geode.Client { - public class Cache : GeodeNativeObject, IGeodeCache { + public class Cache : IGeodeCache { +private IntPtr _cacheFactory; +private CacheInterop _cacheInterop; private static string _name = String.Empty; private PoolManager _poolManager = null; private PoolFactory _poolFactory = null; private IAuthInitialize _authInitialize; private GetCredentialsDelegateInternal _getCredentialsDelegate; private CloseDelegateInternal _closeDelegate; +private bool disposedValue; internal delegate void GetCredentialsDelegateInternal(IntPtr cache); internal delegate void CloseDelegateInternal(); -[DllImport(Constants.libPath, CallingConvention = CallingConvention.Cdecl)] -private static extern void apache_geode_CacheFactory_SetAuthInitialize( -IntPtr factory, GetCredentialsDelegateInternal getCredentials, -CloseDelegateInternal close); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern IntPtr apache_geode_CacheFactory_CreateCache(IntPtr factory); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern bool apache_geode_Cache_GetPdxIgnoreUnreadFields(IntPtr cache); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern bool apache_geode_Cache_GetPdxReadSerialized(IntPtr cache); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern IntPtr apache_geode_Cache_GetName(IntPtr cache); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern void apache_geode_Cache_Close(IntPtr cache, bool keepalive); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern bool apache_geode_Cache_IsClosed(IntPtr cache); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern bool apache_geode_AuthInitialize_AddProperty(IntPtr properties, - IntPtr key, - IntPtr value); - -[DllImport(Constants.libPath, CharSet = CharSet.Auto)] -private static extern void apache_geode_DestroyCache(IntPtr cache); - internal Cache(IntPtr cacheFactory, IAuthInitialize authInitialize) { _authInitialize = authInitialize; + _cacheFactory = cacheFactory; + _cacheInterop = new CacheInterop(cacheFactory, authInitialize); if (_authInitialize != null) { _getCredentialsDelegate = new GetCredentialsDelegateInternal(AuthGetCredentials); _closeDelegate = new CloseDelegateInternal(AuthClose); - -apache_geode_CacheFactory_SetAuthInitialize(cacheFactory, _getCredentialsDelegate, -_closeDelegate); } - _containedObject = apache_geode_CacheFactory_CreateCache(cacheFactory); } internal void AuthGetCredentials(IntPtr properties) { @@ -87,7 +57,7 @@ namespace Apache.Geode.Client { Console.WriteLine("Found credential: (k, v) = ({0}, {1})", entry.Key, entry.Value); var keyPtr = Marshal.StringToCoTaskMemUTF8(entry.Key); var valuePtr = Marshal.StringToCoTaskMemUTF8(entry.Value); -apache_geode_AuthInitialize_AddProperty(properties, keyPtr, valuePtr); +//apache_geode_AuthInitialize_AddProperty(properties, keyPtr, valuePtr); Marshal.FreeCoTaskMem(keyPtr); Marshal.FreeCoTaskMem(valuePtr); } @@ -98,25 +68,33 @@ namespace Apache.Geode.Client { } public void Close() { - apache_geode_Cache_Close(_
[geode-native] branch GEODE-9712-genericize-netcore created (now 2503eed)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9712-genericize-netcore in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 2503eed Genericize netcore-lib This branch includes the following new commits: new a5fc920 Modify tests for generics (wip) new 2503eed Genericize netcore-lib The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] branch develop updated: Fix to disable auto updates on rhel8 (#898)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 059deaf Fix to disable auto updates on rhel8 (#898) 059deaf is described below commit 059deafd1fe953ac738e39f8c9d9e64482af5043 Author: Michael Martell AuthorDate: Thu Dec 2 09:29:38 2021 -0800 Fix to disable auto updates on rhel8 (#898) --- packer/build-rhel-8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/build-rhel-8.json b/packer/build-rhel-8.json index 0f1f21e..c2acb6f 100644 --- a/packer/build-rhel-8.json +++ b/packer/build-rhel-8.json @@ -64,7 +64,7 @@ "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'", "inline": [ "yum update -y", -"yum remove -y df-automatic" +"yum remove -y dnf-automatic" ] }, {
[geode-native] branch develop updated: GEODE-9804: new register interest tests (#894)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new c5aee1b GEODE-9804: new register interest tests (#894) c5aee1b is described below commit c5aee1b68a0cfeda2480afb4b27bd2b12fae0d8f Author: Michael Martell AuthorDate: Fri Nov 19 17:30:22 2021 -0800 GEODE-9804: new register interest tests (#894) * Fixes incorrect fetching of initial entries. * Makes InterestResultPolicy a proper enum. * Adds integration benchmark for register interest. * Fixes for MSVC errors. * Don't ask for keys if not caching locally. * Replace sleep with CacheListener events. * Use latches for syncrhonization with listener. * Change boost loglevel to warning. * Encapsulate synchronization in CountdownCacheListener. Co-authored-by: Jacob Barrett --- .../testThinClientIntResPolKeysInv.cpp | 1 - cppcache/integration/benchmark/CMakeLists.txt | 4 +- cppcache/integration/benchmark/RegionBM.cpp| 15 +- .../integration/benchmark/RegisterInterestBM.cpp | 156 ++ cppcache/integration/test/RegisterKeysTest.cpp | 258 cppcache/src/InterestResultPolicy.cpp | 31 -- cppcache/src/InterestResultPolicy.hpp | 39 +-- cppcache/src/LocalRegion.cpp | 3 +- cppcache/src/LocalRegion.hpp | 4 +- cppcache/src/TcrChunkedContext.hpp | 1 - cppcache/src/TcrMessage.cpp| 129 cppcache/src/TcrMessage.hpp| 29 +- cppcache/src/ThinClientRegion.cpp | 342 - cppcache/test/CMakeLists.txt | 1 - cppcache/test/InterestResultPolicyTest.cpp | 34 -- cppcache/test/TcrMessageTest.cpp | 123 ++-- 16 files changed, 754 insertions(+), 416 deletions(-) diff --git a/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp b/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp index d918856..210b6a3 100644 --- a/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp +++ b/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp @@ -360,7 +360,6 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT2, StepEight) { auto regPtr1 = getHelper()->getRegion(regionNames[1]); -// regPtr1->registerRegex(regexWildcard); regPtr1->registerAllKeys(); verifyInvalid(regionNames[1], keys[0]); diff --git a/cppcache/integration/benchmark/CMakeLists.txt b/cppcache/integration/benchmark/CMakeLists.txt index 88254d2..0702ae4 100644 --- a/cppcache/integration/benchmark/CMakeLists.txt +++ b/cppcache/integration/benchmark/CMakeLists.txt @@ -16,7 +16,9 @@ add_executable(cpp-integration-benchmark main.cpp RegionBM.cpp - PdxTypeBM.cpp) + PdxTypeBM.cpp + RegisterInterestBM.cpp +) target_link_libraries(cpp-integration-benchmark PUBLIC diff --git a/cppcache/integration/benchmark/RegionBM.cpp b/cppcache/integration/benchmark/RegionBM.cpp index 7fef624..da1b910 100644 --- a/cppcache/integration/benchmark/RegionBM.cpp +++ b/cppcache/integration/benchmark/RegionBM.cpp @@ -19,21 +19,16 @@ #include #include -// Disable warning for "extra qualifications" here. One of the boost log -// headers triggers this warning. Note: use of disable pragma here is -// intentional - attempts to use push/pop as you ordinarily should just -// yielded a gripe from the MS tools that "warning number '4596' is not a -// valid compiler warning". re-enabling the warning after the include -// fails in the same way, so just leave it disabled for the rest of the -// file. This is safe, since the warning can only trigger inside a class -// declaration, of which there are none in this file. -#ifdef WIN32 +#ifdef _MSC_VER +#pragma warning(push) #pragma warning(disable : 4596) #endif - #include #include #include +#ifdef _MSC_VER +#pragma warning(pop) +#endif #include #include diff --git a/cppcache/integration/benchmark/RegisterInterestBM.cpp b/cppcache/integration/benchmark/RegisterInterestBM.cpp new file mode 100644 index 000..7f6154b --- /dev/null +++ b/cppcache/integration/benchmark/RegisterInterestBM.cpp @@ -0,0 +1,156 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed
[geode-native] branch GEODE-9741-fix-release-build created (now 5fcf687)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9741-fix-release-build in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 5fcf687 Use vcvarsall.bat on Windows 2019 This branch includes the following new commits: new 3dadfae Call vcvarsall on Windows' new 5fcf687 Use vcvarsall.bat on Windows 2019 The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 01/02: Call vcvarsall on Windows'
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9741-fix-release-build in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 3dadfae3554ec1e550d1a771e8c7a455a5538420 Author: Mike Martell AuthorDate: Sat Oct 30 06:47:22 2021 -0700 Call vcvarsall on Windows' --- ci/lib/templates.lib.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/lib/templates.lib.txt b/ci/lib/templates.lib.txt index 01e3b93..af05714 100644 --- a/ci/lib/templates.lib.txt +++ b/ci/lib/templates.lib.txt @@ -203,6 +203,9 @@ git_rev=$(git rev-parse HEAD) popd version=$(cat version/number) builddate=$(date "+%Y-%m-%d") +#@ if build.image_family == "build-windows-2019-vs-2019": + remote_shell 'c:/"Program Files (x86)\Microsoft Visual Studio"/2019/Community/VC/Auxiliary/Build/vcvarsall.bat x64 10.0.16299.0 -vcvars_ver=14.20' +#@end remote_shell cmake -E make_directory build remote_shell cmake -E time cmake -E chdir build cmake ../source ${CMAKE_CONFIGURE_FLAGS} \ -DCMAKE_BUILD_TYPE=${CMAKE_CONFIG} \
[geode-native] 02/02: Use vcvarsall.bat on Windows 2019
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9741-fix-release-build in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 5fcf68791b71cc01ed028f56b45317ef98b2191f Author: Mike Martell AuthorDate: Sun Oct 31 23:14:43 2021 -0700 Use vcvarsall.bat on Windows 2019 --- ci/lib/templates.lib.txt | 8 ci/lib/templates.lib.yml | 10 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ci/lib/templates.lib.txt b/ci/lib/templates.lib.txt index af05714..6d21cb4 100644 --- a/ci/lib/templates.lib.txt +++ b/ci/lib/templates.lib.txt @@ -194,7 +194,7 @@ set -ueo pipefail remote_download_directory build . (@- end @) -(@ def build_bash_task(): -@) +(@ def build_bash_task(use_vcvarsall): -@) set -ueo pipefail (@= remote_functions() @) pushd source @@ -203,9 +203,9 @@ git_rev=$(git rev-parse HEAD) popd version=$(cat version/number) builddate=$(date "+%Y-%m-%d") -#@ if build.image_family == "build-windows-2019-vs-2019": - remote_shell 'c:/"Program Files (x86)\Microsoft Visual Studio"/2019/Community/VC/Auxiliary/Build/vcvarsall.bat x64 10.0.16299.0 -vcvars_ver=14.20' -#@end +(@- if use_vcvarsall: @) +remote_shell "c:/Program Files (x86)\Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 10.0.16299.0 -vcvars_ver=14.20 +(@ end -@) remote_shell cmake -E make_directory build remote_shell cmake -E time cmake -E chdir build cmake ../source ${CMAKE_CONFIGURE_FLAGS} \ -DCMAKE_BUILD_TYPE=${CMAKE_CONFIG} \ diff --git a/ci/lib/templates.lib.yml b/ci/lib/templates.lib.yml index b38e580..f7730a8 100644 --- a/ci/lib/templates.lib.yml +++ b/ci/lib/templates.lib.yml @@ -149,13 +149,13 @@ source: #@ end --- -#@ def build_task(config, params={}): +#@ def build_task(config, use_vcvarsall, params={}): #@ params = struct.decode(params) #@ params.update({"CMAKE_CONFIG": config}) #@ return bash_task("build", #@ [{"name":"instance"},{"name":"version"},{"name":"source"}], #@ [{"name":"package"}], -#@ build_bash_task(), +#@ build_bash_task(use_vcvarsall), #@ params=params) #@ end @@ -211,7 +211,11 @@ plan: steps: - #@ bash_task("upload-source", [{"name":"instance"},{"name":"source"}], [], upload_source_bash_task()) - #@ bash_task("upload-geode", [{"name":"instance"},{"name":"geode-latest"}], [], upload_geode_bash_task()) -- #@ build_task(config.config, build.params) +#@ if build.image_family == "build-windows-2019-vs-2019": +- #@ build_task(config.config, True, build.params) +#@ else: +- #@ build_task(config.config, False, build.params) +#@ end - #@ remote_task("cpp-unit-tests", config.config, ctest_bash_task("build/cppcache/test", parallel=8), "30m", build.params) - #@ remote_task("cpp-integration-tests", config.config, ctest_bash_task("build/cppcache/integration/test", parallel=4), "1h", build.params) - #@ remote_task("cpp-legacy-integration-tests", config.config, ctest_bash_task("build/cppcache/integration-test", timeout=500, parallel=4), "2h", build.params)
[geode-native] branch develop updated: GEODE-9741: Use v142 Toolchain in Visual Studio 2019 CI Pipeline (#884)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new e7ff147 GEODE-9741: Use v142 Toolchain in Visual Studio 2019 CI Pipeline (#884) e7ff147 is described below commit e7ff1475fa9cc03dd1653d31c5ffdea1a1cf638a Author: Michael Martell AuthorDate: Tue Oct 26 12:27:06 2021 -0700 GEODE-9741: Use v142 Toolchain in Visual Studio 2019 CI Pipeline (#884) * Add v142 to VS 2019 and build with it * Use explicit versions * Use lowest versions for tools & sdk --- ci/base/base.yml | 2 +- packer/windows/install-vs-2019-community.ps1 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/base/base.yml b/ci/base/base.yml index c336540..a07224e 100644 --- a/ci/base/base.yml +++ b/ci/base/base.yml @@ -72,7 +72,7 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv142,version=14.20,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP" diff --git a/packer/windows/install-vs-2019-community.ps1 b/packer/windows/install-vs-2019-community.ps1 index 460dfd1..7f2580b 100644 --- a/packer/windows/install-vs-2019-community.ps1 +++ b/packer/windows/install-vs-2019-community.ps1 @@ -29,13 +29,14 @@ $args = @('--add Microsoft.VisualStudio.Component.CoreEditor', '--add Microsoft.Net.Component.4.5.2.TargetingPack', '--add Microsoft.VisualStudio.Component.IntelliCode', '--add Microsoft.VisualStudio.Component.VC.CoreIde', + '--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64', '--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest', '--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core', '--add Microsoft.VisualStudio.Component.VC.ATL', '--add Microsoft.VisualStudio.Component.Windows10SDK.16299', - '--add Microsoft.VisualStudio.Component.VC.v141.x86.x64', + '--add Microsoft.VisualStudio.Component.VC.14.20.x86.x64', '--add Microsoft.VisualStudio.Workload.NativeDesktop', - '--add Microsoft.VisualStudio.Component.VC.v141.CLI.Support', + '--add Microsoft.VisualStudio.Component.VC.14.20.CLI.Support', '--add Microsoft.Net.Component.4.6.1.SDK', '--quiet')
[geode-native] branch GEODE-9741-t142 updated (5bbdc0c -> 77b25ce)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9741-t142 in repository https://gitbox.apache.org/repos/asf/geode-native.git. from 5bbdc0c Use lowest versions for tools & sdk add 77b25ce Add the build tools to VS install: - without this, cmake won't work with new tooling No new revisions were added by this update. Summary of changes: packer/windows/install-vs-2019-community.ps1 | 1 + 1 file changed, 1 insertion(+)
[geode-native] branch GEODE-9741-t142 updated (535dce3 -> 5bbdc0c)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9741-t142 in repository https://gitbox.apache.org/repos/asf/geode-native.git. from 535dce3 Use explicit versions add 5bbdc0c Use lowest versions for tools & sdk No new revisions were added by this update. Summary of changes: ci/base/base.yml | 2 +- packer/windows/install-vs-2019-community.ps1 | 79 ++-- 2 files changed, 5 insertions(+), 76 deletions(-)
[geode-native] 01/02: Add v142 to VS 2019 and build with it
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9741-t142 in repository https://gitbox.apache.org/repos/asf/geode-native.git commit b07528e17003f1b0b9350fa13c1c155657117488 Author: Mike Martell AuthorDate: Fri Oct 15 06:03:20 2021 -0700 Add v142 to VS 2019 and build with it --- ci/base/base.yml | 3 +- packer/windows/install-vs-2019-community.ps1 | 79 ++-- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/ci/base/base.yml b/ci/base/base.yml index c336540..a5397d9 100644 --- a/ci/base/base.yml +++ b/ci/base/base.yml @@ -72,7 +72,8 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + #CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + CMAKE_CONFIGURE_FLAGS: ".." CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP" diff --git a/packer/windows/install-vs-2019-community.ps1 b/packer/windows/install-vs-2019-community.ps1 index 460dfd1..193d39a 100644 --- a/packer/windows/install-vs-2019-community.ps1 +++ b/packer/windows/install-vs-2019-community.ps1 @@ -21,22 +21,93 @@ write-host "Installing Visual Studio 2019 Community..." $args = @('--add Microsoft.VisualStudio.Component.CoreEditor', '--add Microsoft.VisualStudio.Workload.CoreEditor', + '--add Microsoft.NetCore.Component.Runtime.5.0', + '--add Microsoft.NetCore.Component.Runtime.3.1', + '--add Microsoft.NetCore.Component.SDK', + '--add Microsoft.VisualStudio.Component.NuGet', '--add Microsoft.Net.Component.4.6.1.TargetingPack', '--add Microsoft.VisualStudio.Component.Roslyn.Compiler', + '--add Microsoft.VisualStudio.Component.Roslyn.LanguageServices', + '--add Microsoft.VisualStudio.Component.FSharp', + '--add Microsoft.ComponentGroup.ClickOnce.Publish', + '--add Microsoft.NetCore.Component.DevelopmentTools', + '--add Microsoft.VisualStudio.Component.FSharp.WebTemplates', + '--add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions', + '--add Microsoft.VisualStudio.Component.DockerTools', + '--add Microsoft.NetCore.Component.Web', '--add Microsoft.Net.Component.4.8.SDK', + '--add Microsoft.Net.Component.4.7.2.TargetingPack', + '--add Microsoft.Net.ComponentGroup.DevelopmentPrerequisites', + '--add Microsoft.VisualStudio.Component.TypeScript.4.3', + '--add Microsoft.VisualStudio.Component.JavaScript.TypeScript', + '--add Microsoft.VisualStudio.Component.JavaScript.Diagnostics', '--add Microsoft.Component.MSBuild', '--add Microsoft.VisualStudio.Component.TextTemplating', + '--add Component.Microsoft.VisualStudio.RazorExtension', + '--add Microsoft.VisualStudio.Component.IISExpress', + '--add Microsoft.VisualStudio.Component.SQL.ADAL', + '--add Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime', + '--add Microsoft.VisualStudio.Component.Common.Azure.Tools', + '--add Microsoft.VisualStudio.Component.SQL.CLR', + '--add Microsoft.VisualStudio.Component.MSODBC.SQL', + '--add Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils', + '--add Microsoft.VisualStudio.Component.ManagedDesktop.Core', '--add Microsoft.Net.Component.4.5.2.TargetingPack', + '--add Microsoft.Net.Component.4.5.TargetingPack', + '--add Microsoft.VisualStudio.Component.SQL.SSDT', + '--add Microsoft.VisualStudio.Component.SQL.DataSources', + '--add Component.Microsoft.Web.LibraryManager', + '--add Component.Microsoft.WebTools.BrowserLink.WebLivePreview', + '--add Microsoft.VisualStudio.ComponentGroup.Web', + '--add Microsoft.VisualStudio.Component.Web', + '--add Microsoft.VisualStudio.ComponentGroup.Web.Client', + '--add Microsoft.Net.Component.4.TargetingPack', + '--add Microsoft.Net.Component.4.5.1.TargetingPack', + '--add Microsoft.Net.Component.4.6.TargetingPack', + '--add Microsoft.Net.ComponentGroup.TargetingPacks.Common', + '--add Component.Microsoft.VisualStudio.Web.AzureFunctions', + '--add Microsoft.VisualStudio.ComponentGroup.AzureFunctions', + '--add Microsoft.VisualStudio.Component.Azure.Compute.Emulator', + '--add Microsoft.VisualStudio.Component.Azure.Storage.Emulator', + '--add Microsoft.VisualStudio.Component.Azure.ClientLibs', + '--add Microsoft.VisualStudio.Component.Azure.AuthoringTools', + '--add Microsoft.VisualStudio.Component.CloudExplorer', + '--add Microsoft.Vi
[geode-native] 02/02: Use explicit versions
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9741-t142 in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 535dce310078324d9ebd2cb671ec761f111ab882 Author: Mike Martell AuthorDate: Tue Oct 19 06:34:23 2021 -0700 Use explicit versions --- ci/base/base.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/base/base.yml b/ci/base/base.yml index a5397d9..1a17532 100644 --- a/ci/base/base.yml +++ b/ci/base/base.yml @@ -72,8 +72,7 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - #CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" - CMAKE_CONFIGURE_FLAGS: ".." + CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv142,version=14.29,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0" CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP"
[geode-native] branch GEODE-9741-t142 created (now 535dce3)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9741-t142 in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 535dce3 Use explicit versions This branch includes the following new commits: new b07528e Add v142 to VS 2019 and build with it new 535dce3 Use explicit versions The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] branch test-v142 updated: Use explicit versions
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch test-v142 in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/test-v142 by this push: new a694f6c Use explicit versions a694f6c is described below commit a694f6c18497eeea94ee289ba25afdb71085f10f Author: Mike Martell AuthorDate: Tue Oct 19 06:34:23 2021 -0700 Use explicit versions --- ci/base/base.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/base/base.yml b/ci/base/base.yml index a5397d9..1a17532 100644 --- a/ci/base/base.yml +++ b/ci/base/base.yml @@ -72,8 +72,7 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - #CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" - CMAKE_CONFIGURE_FLAGS: ".." + CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv142,version=14.29,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0" CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP"
[geode-native] branch test-v142 updated: Use cmake .. and branch: test-v142
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch test-v142 in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/test-v142 by this push: new 79945d3 Use cmake .. and branch: test-v142 79945d3 is described below commit 79945d32ac5e23c86634ab512e33375f98990473 Author: Mike Martell AuthorDate: Tue Oct 19 04:52:19 2021 -0700 Use cmake .. and branch: test-v142 --- ci/geode-native-t142.yml | 102 +++ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/ci/geode-native-t142.yml b/ci/geode-native-t142.yml index 8982459..81a664b 100644 --- a/ci/geode-native-t142.yml +++ b/ci/geode-native-t142.yml @@ -320,7 +320,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -401,7 +401,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -459,7 +459,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -517,7 +517,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -575,7 +575,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -633,7 +633,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -691,7 +691,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -749,7 +749,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -807,7 +807,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -865,7 +865,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -1271,7 +1271,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: RelWithDebInfo - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -1352,7 +1352,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: RelWithDebInfo - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP platform: linux run: @@ -1410,7 +1410,7 @@ jobs: params: CMAKE_BUILD_FLAGS: /m CMAKE_CONFIG: RelWithDebInfo - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 + CMAKE_CONFIGURE_FLAGS: .. CPACK_GENERATORS: ZIP
[geode-native] branch develop updated: GEODE-9719: Start/Stop cluster in a test fixture (#881)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 5a1ba8d GEODE-9719: Start/Stop cluster in a test fixture (#881) 5a1ba8d is described below commit 5a1ba8d19709dcda170ea7e313cbae7ad92f797c Author: Michael Martell AuthorDate: Mon Oct 18 14:01:14 2021 -0700 GEODE-9719: Start/Stop cluster in a test fixture (#881) * Start/Stop cluster in a test fixture * Create an authRegion in same cluster * Turn off cluster output after all tests run --- .../netcore-integration-test/NetCoreTestFixture.cs | 68 ++ .../netcore-integration-test/RegionFactoryTest.cs | 36 ++-- .../SessionStateIntegrationTests.cs| 101 + netcore/shared/Cluster.cs | 2 +- netcore/shared/GfshExecute.cs | 7 ++ 5 files changed, 130 insertions(+), 84 deletions(-) diff --git a/netcore/netcore-integration-test/NetCoreTestFixture.cs b/netcore/netcore-integration-test/NetCoreTestFixture.cs new file mode 100644 index 000..992a7b3 --- /dev/null +++ b/netcore/netcore-integration-test/NetCoreTestFixture.cs @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using Xunit; +using Xunit.Abstractions; +using Apache.Geode.Client.IntegrationTests; + +namespace Apache.Geode.Client.IntegrationTests +{ + public class NetCoreTestFixture : IDisposable + { +internal Cluster cluster; +public ITestOutputHelper Output { get; set; } + +public NetCoreTestFixture SetOutPut(ITestOutputHelper output) +{ + Output = output; + return this; +} + +public void CreateCluster() +{ + if (cluster == null) + { +cluster = new Cluster(Output, "NetCoreTests", 1, 1); + +Assert.True(cluster.Start()); +Assert.Equal(0, cluster.Gfsh +.create() +.region() +.withName("exampleRegion") +.withType("PARTITION") +.execute()); + +Assert.Equal(0, cluster.Gfsh +.create() +.region() +.withName("authExampleRegion") +.withType("PARTITION") +.execute()); + } +} + +public void Dispose() +{ + // At this point, the last test has executed and the ITestOutputHelper is + // no longer available. Hence set the output to null in the cluster. + cluster.Gfsh.Output = null; + cluster.Dispose(); + Output = null; +} + } +} diff --git a/netcore/netcore-integration-test/RegionFactoryTest.cs b/netcore/netcore-integration-test/RegionFactoryTest.cs index 9f0e6d9..edac8ad 100644 --- a/netcore/netcore-integration-test/RegionFactoryTest.cs +++ b/netcore/netcore-integration-test/RegionFactoryTest.cs @@ -36,10 +36,15 @@ namespace Apache.Geode.Client.IntegrationTests { } [Collection("Geode .Net Core Collection")] - public class RegionFactoryTest : TestBase + public class RegionFactoryTest : TestBase, IClassFixture { -public RegionFactoryTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper) +NetCoreTestFixture fixture; + +public RegionFactoryTest(NetCoreTestFixture fixture, ITestOutputHelper testOutputHelper) : base(testOutputHelper) { + this.fixture = fixture; + this.fixture.Output = testOutputHelper; + this.fixture.CreateCluster(); } private const string Username1 = "rtimmons"; @@ -88,41 +93,19 @@ namespace Apache.Geode.Client.IntegrationTests { [Fact] public void RegionFactoryCreateProxyRegionStringPutGet() { - using (var cluster = new Cluster(output, CreateTestCaseDirectoryName(), 1, 1)) - { -Assert.True(cluster.Start()); -Assert.Equal(0, cluster.Gfsh -.create() -.region() -.withName("exampleRegion") -.withType("PARTITION") -.execute()); - using v
[geode-native] branch test-v142 created (now 96b46de)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch test-v142 in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 96b46de Save rendered t142 yml This branch includes the following new commits: new 111ef8a Add v142 to VS 2019 and build with it new 96b46de Save rendered t142 yml The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 01/02: Add v142 to VS 2019 and build with it
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch test-v142 in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 111ef8a39e37a358bb1a2754ab770aac14d95ce4 Author: Mike Martell AuthorDate: Fri Oct 15 06:03:20 2021 -0700 Add v142 to VS 2019 and build with it --- ci/base/base.yml | 3 +- packer/windows/install-vs-2019-community.ps1 | 79 ++-- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/ci/base/base.yml b/ci/base/base.yml index c336540..a5397d9 100644 --- a/ci/base/base.yml +++ b/ci/base/base.yml @@ -72,7 +72,8 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + #CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + CMAKE_CONFIGURE_FLAGS: ".." CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP" diff --git a/packer/windows/install-vs-2019-community.ps1 b/packer/windows/install-vs-2019-community.ps1 index 460dfd1..193d39a 100644 --- a/packer/windows/install-vs-2019-community.ps1 +++ b/packer/windows/install-vs-2019-community.ps1 @@ -21,22 +21,93 @@ write-host "Installing Visual Studio 2019 Community..." $args = @('--add Microsoft.VisualStudio.Component.CoreEditor', '--add Microsoft.VisualStudio.Workload.CoreEditor', + '--add Microsoft.NetCore.Component.Runtime.5.0', + '--add Microsoft.NetCore.Component.Runtime.3.1', + '--add Microsoft.NetCore.Component.SDK', + '--add Microsoft.VisualStudio.Component.NuGet', '--add Microsoft.Net.Component.4.6.1.TargetingPack', '--add Microsoft.VisualStudio.Component.Roslyn.Compiler', + '--add Microsoft.VisualStudio.Component.Roslyn.LanguageServices', + '--add Microsoft.VisualStudio.Component.FSharp', + '--add Microsoft.ComponentGroup.ClickOnce.Publish', + '--add Microsoft.NetCore.Component.DevelopmentTools', + '--add Microsoft.VisualStudio.Component.FSharp.WebTemplates', + '--add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions', + '--add Microsoft.VisualStudio.Component.DockerTools', + '--add Microsoft.NetCore.Component.Web', '--add Microsoft.Net.Component.4.8.SDK', + '--add Microsoft.Net.Component.4.7.2.TargetingPack', + '--add Microsoft.Net.ComponentGroup.DevelopmentPrerequisites', + '--add Microsoft.VisualStudio.Component.TypeScript.4.3', + '--add Microsoft.VisualStudio.Component.JavaScript.TypeScript', + '--add Microsoft.VisualStudio.Component.JavaScript.Diagnostics', '--add Microsoft.Component.MSBuild', '--add Microsoft.VisualStudio.Component.TextTemplating', + '--add Component.Microsoft.VisualStudio.RazorExtension', + '--add Microsoft.VisualStudio.Component.IISExpress', + '--add Microsoft.VisualStudio.Component.SQL.ADAL', + '--add Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime', + '--add Microsoft.VisualStudio.Component.Common.Azure.Tools', + '--add Microsoft.VisualStudio.Component.SQL.CLR', + '--add Microsoft.VisualStudio.Component.MSODBC.SQL', + '--add Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils', + '--add Microsoft.VisualStudio.Component.ManagedDesktop.Core', '--add Microsoft.Net.Component.4.5.2.TargetingPack', + '--add Microsoft.Net.Component.4.5.TargetingPack', + '--add Microsoft.VisualStudio.Component.SQL.SSDT', + '--add Microsoft.VisualStudio.Component.SQL.DataSources', + '--add Component.Microsoft.Web.LibraryManager', + '--add Component.Microsoft.WebTools.BrowserLink.WebLivePreview', + '--add Microsoft.VisualStudio.ComponentGroup.Web', + '--add Microsoft.VisualStudio.Component.Web', + '--add Microsoft.VisualStudio.ComponentGroup.Web.Client', + '--add Microsoft.Net.Component.4.TargetingPack', + '--add Microsoft.Net.Component.4.5.1.TargetingPack', + '--add Microsoft.Net.Component.4.6.TargetingPack', + '--add Microsoft.Net.ComponentGroup.TargetingPacks.Common', + '--add Component.Microsoft.VisualStudio.Web.AzureFunctions', + '--add Microsoft.VisualStudio.ComponentGroup.AzureFunctions', + '--add Microsoft.VisualStudio.Component.Azure.Compute.Emulator', + '--add Microsoft.VisualStudio.Component.Azure.Storage.Emulator', + '--add Microsoft.VisualStudio.Component.Azure.ClientLibs', + '--add Microsoft.VisualStudio.Component.Azure.AuthoringTools', + '--add Microsoft.VisualStudio.Component.CloudExplorer', + '--add Microsoft.Vi
[geode-native] branch develop updated: GEODE-9600: Add Cluster Support to NetCore Test Framework (#880)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 620479a GEODE-9600: Add Cluster Support to NetCore Test Framework (#880) 620479a is described below commit 620479a5069a7c97956cdf46f2b0f69384ff6b94 Author: Michael Martell AuthorDate: Tue Oct 12 08:44:25 2021 -0700 GEODE-9600: Add Cluster Support to NetCore Test Framework (#880) * Add cluster support to netcore-integration-test and netcore-session integration-test * Add top level solution for netcore * Add programmatic cluster files in shared folder for use by both test projects * Address Rat check issue: Add using statement to new Process * Remove gfsh based cluster scripts, now supported in cluster.cs, etc. * Update refs to Cluster.cs, etc. in project files * cmake configure Config.cs.in so environment vars are not required * Remove old netcore solution file * Cleanup per review: Geode .Net Core, not .net Core --- netcore/CMakeLists.txt | 1 + netcore/geode-dotnet-core.sln | 56 --- netcore/netcore-integration-test/CMakeLists.txt| 27 -- .../netcore-integration-test/CacheFactoryTest.cs | 12 +- netcore/netcore-integration-test/CacheTest.cs | 4 +- .../NetCoreCollectionFixture.cs| 2 +- netcore/netcore-integration-test/ObjectLeakTest.cs | 4 +- .../netcore-integration-test/PoolFactoryTest.cs| 4 +- .../netcore-integration-test/PoolManagerTest.cs| 4 +- .../netcore-integration-test/RegionFactoryTest.cs | 60 ++- .../netcore-integration-test.csproj| 9 + .../CMakeLists.txt | 27 -- .../SessionStateIntegrationTests.cs| 336 -- .../netcore-session-integration-test.csproj| 9 + netcore/netcore.sln| 49 ++ netcore/{ => shared}/CMakeLists.txt| 15 +- netcore/shared/Cluster.cs | 300 + .../Config.cs.in} | 39 +- .../Framework.cs} | 33 +- netcore/shared/Gfsh.cs | 493 + netcore/shared/GfshExecute.cs | 201 + netcore/shared/TestBase.cs | 55 +++ 22 files changed, 1428 insertions(+), 312 deletions(-) diff --git a/netcore/CMakeLists.txt b/netcore/CMakeLists.txt index b5c3536..0caa268 100644 --- a/netcore/CMakeLists.txt +++ b/netcore/CMakeLists.txt @@ -24,5 +24,6 @@ if(DOTNET AND INCLUDE_DOTNET_CORE) add_subdirectory(netcore-integration-test) add_subdirectory(netcore-session-integration-test) add_subdirectory(utility) + add_subdirectory(shared) endif() diff --git a/netcore/geode-dotnet-core.sln b/netcore/geode-dotnet-core.sln deleted file mode 100644 index 83316b9..000 --- a/netcore/geode-dotnet-core.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30001.183 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "netcore", "netcore\netcore.csproj", "{09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "netcore-integration-test", "netcore-integration-test\netcore-integration-test.csproj", "{501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Session", "Session", "{520C96EC-F929-4365-8D78-CC5785419B62}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "netcore-session", "netcore-session\netcore-session.csproj", "{B88C58EB-B144-403B-85F7-7A5B45E643E3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "netcore-session-integration-test", "netcore-session-integration-test\netcore-session-integration-test.csproj", "{94D2CD59-A5F3-4504-BF01-0A3B95CE12B5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "asp-netcore-session-sample", "asp-netcore-session-sample\asp-netcore-session-sample.csproj", "{4E830BC8-D1CA-40AF-9C9C-D15E193C6585}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|x64.ActiveCfg = Debug|x64 - {09ABBCE
[geode-native] branch develop updated: GEODE-9631: New tests for reauthentication (#876)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new c84e107 GEODE-9631: New tests for reauthentication (#876) c84e107 is described below commit c84e10769105aad8d39337a4c3ba70ce5ad6ab87 Author: Michael Martell AuthorDate: Wed Oct 6 12:47:06 2021 -0700 GEODE-9631: New tests for reauthentication (#876) * New tests for reauthentication and durability * Add new SimulatedExpirationSecurityManager for reauthentication testing --- cppcache/integration/test/AuthInitializeTest.cpp | 69 .../integration/test/CqPlusAuthInitializeTest.cpp | 188 + .../SimulatedExpirationSecurityManager.java| 77 + 3 files changed, 334 insertions(+) diff --git a/cppcache/integration/test/AuthInitializeTest.cpp b/cppcache/integration/test/AuthInitializeTest.cpp index 2fcefff..b1c18d3 100644 --- a/cppcache/integration/test/AuthInitializeTest.cpp +++ b/cppcache/integration/test/AuthInitializeTest.cpp @@ -65,6 +65,7 @@ using apache::geode::client::RegionShortcut; using std::chrono::minutes; const int32_t CQ_PLUS_AUTH_TEST_REGION_ENTRY_COUNT = 10; +const int32_t CQ_REAUTH_TEST_REGION_ENTRY_COUNT = 5000; Cache createCache(std::shared_ptr auth) { auto cache = CacheFactory() @@ -221,3 +222,71 @@ TEST(AuthInitializeTest, badCredentialsWithSubscriptionEnabled) { ASSERT_GT(authInitialize->getGetCredentialsCallCount(), 0); } + +TEST(AuthInitializeTest, verifyReAuthAfterCredsExpire) { + // Start a cluster with user expiration support + + Cluster cluster( + Name(std::string(::testing::UnitTest::GetInstance() + ->current_test_info() + ->test_suite_name()) + + "/" + + ::testing::UnitTest::GetInstance()->current_test_info()->name()), + Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)}, + SecurityManager{"javaobject.SimulatedExpirationSecurityManager"}, + User{"root"}, Password{"root-password"}, LocatorCount{1}, ServerCount{1}); + + cluster.start(); + + cluster.getGfsh() + .create() + .region() + .withName("region") + .withType("PARTITION") + .execute(); + + // Use a non-root user for reAuthentication testing. + + auto authInitialize = + std::make_shared("user", "user-password"); + + auto cache = createCache(authInitialize); + auto pool = createPool(cluster, cache, false); + auto region = setupRegion(cache, pool); + + int numSuccessfulOps = 0; + int numFailedOps = 0; + std::string key; + std::string value; + for (int i = 0; i < CQ_REAUTH_TEST_REGION_ENTRY_COUNT; i++) { +try { + key = "foo" + std::to_string(i); + value = "bar" + std::to_string(i); + region->put(key, value); + + auto retrievedValue = region->get(key); + auto retrivedValueAsString = + std::dynamic_pointer_cast(retrievedValue)->value(); + ASSERT_EQ(retrivedValueAsString, value); + numSuccessfulOps++; +} catch (const Exception& ex) { + std::cout << "Caught unexpected exception: " << ex.what() << std::endl; + numFailedOps++; +} + } + + ASSERT_EQ(numSuccessfulOps, CQ_REAUTH_TEST_REGION_ENTRY_COUNT); + ASSERT_EQ(numFailedOps, 0); + + // SimulatedExpirationSecurityManager is set to throw + // AuthenticationExpiredException for 1% of operations. + // If the random number generator were perfect we'd expect reauth + // to happen for 1% of the operations. Back it off to .5% since + // it's not perfect. + // + // Number of operations is 2 * CQ_REAUTH_TEST_REGION_ENTRY_COUNT + // since doing put and get. + + EXPECT_GT(authInitialize->getGetCredentialsCallCount(), +2 * CQ_REAUTH_TEST_REGION_ENTRY_COUNT * .005); +} diff --git a/cppcache/integration/test/CqPlusAuthInitializeTest.cpp b/cppcache/integration/test/CqPlusAuthInitializeTest.cpp index 0811f5a..da8c8d9 100644 --- a/cppcache/integration/test/CqPlusAuthInitializeTest.cpp +++ b/cppcache/integration/test/CqPlusAuthInitializeTest.cpp @@ -61,6 +61,7 @@ using apache::geode::client::RegionShortcut; using std::chrono::minutes; const int32_t CQ_PLUS_AUTH_TEST_REGION_ENTRY_COUNT = 5; +const int32_t CQ_REAUTH_TEST_REGION_ENTRY_COUNT = 5000; Cache createCache(std::shared_ptr auth) { auto cache = CacheFactory() @@ -72,6 +73,19 @@ Cache createCache(std::shared_ptr auth) { return cache; } +Cache createDurableCache(std::shared_ptr auth) { + auto pp = Properties::create(); + pp->insert("durable-client-id", "DurableClient-"); + pp->insert("durable-timeout", std::chrono::seconds(600)); + auto cache = C
[geode-native] 03/03: Support for 32-bit keys/values - includes signed and unsigned
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 198ac47d176d70bab097aee984d264d62f17a224 Author: Mike Martell AuthorDate: Wed Sep 22 21:38:46 2021 -0700 Support for 32-bit keys/values - includes signed and unsigned --- c-bindings/include/geode/region.h | 7 c-bindings/src/region.cpp | 42 +++ c-bindings/src/region.hpp | 4 ++ netcore/NetCore.Test/RegionFactoryTest.cs | 8 netcore/NetCore/Region.cs | 67 +-- 5 files changed, 125 insertions(+), 3 deletions(-) diff --git a/c-bindings/include/geode/region.h b/c-bindings/include/geode/region.h index 7355d04..6c99232 100644 --- a/c-bindings/include/geode/region.h +++ b/c-bindings/include/geode/region.h @@ -42,12 +42,19 @@ APACHE_GEODE_C_EXPORT void apache_geode_Region_PutString( APACHE_GEODE_C_EXPORT void apache_geode_Region_PutByteArray( apache_geode_region_t* region, const char* key, const char* value, size_t size); +APACHE_GEODE_C_EXPORT void apache_geode_Region_PutByteArrayForInt32Key( +apache_geode_region_t* region, int32_t key, const char* value, +size_t size); + APACHE_GEODE_C_EXPORT const char* apache_geode_Region_GetString( apache_geode_region_t* region, const char* key); APACHE_GEODE_C_EXPORT void apache_geode_Region_GetByteArray( apache_geode_region_t* region, const char* key, char** value, size_t* size); +APACHE_GEODE_C_EXPORT void apache_geode_Region_GetByteArrayForInt32Key( +apache_geode_region_t* region, const int32_t key, char** value, size_t* size); + APACHE_GEODE_C_EXPORT void apache_geode_Region_Remove( apache_geode_region_t* region, const char* key); diff --git a/c-bindings/src/region.cpp b/c-bindings/src/region.cpp index 500506b..707ed4f 100644 --- a/c-bindings/src/region.cpp +++ b/c-bindings/src/region.cpp @@ -55,6 +55,12 @@ void RegionWrapper::PutByteArray(const std::string& key, const char* value, region_->put(key, apache::geode::client::CacheableBytes::create(val)); } +void RegionWrapper::PutByteArray(const int32_t key, const char* value, + size_t size) { + std::vector val(value, value + size); + region_->put(key, apache::geode::client::CacheableBytes::create(val)); +} + const char* RegionWrapper::GetString(const std::string& key) { auto value = region_->get(key); lastValue_ = @@ -84,6 +90,27 @@ void RegionWrapper::GetByteArray(const std::string& key, char** value, } } +void RegionWrapper::GetByteArray(const int32_t key, char** value, + size_t* size) { + std::shared_ptr val = region_->get(key); + + if (val.get() == nullptr) return; + + auto bytes = + std::dynamic_pointer_cast(val); + int valSize = val->objectSize(); +#if defined(_WIN32) + int8_t* byteArray = static_cast(CoTaskMemAlloc(valSize)); +#else + int8_t* byteArray = static_cast(malloc(valSize)); +#endif + if (bytes) { +memcpy(byteArray, bytes->value().data(), valSize); +*value = reinterpret_cast(byteArray); +*size = valSize; + } +} + void RegionWrapper::Remove(const std::string& key) { region_->remove(key); } bool RegionWrapper::ContainsValueForKey(const std::string& key) { @@ -108,6 +135,14 @@ void apache_geode_Region_PutByteArray(apache_geode_region_t* region, regionWrapper->PutByteArray(key, value, size); } +void apache_geode_Region_PutByteArrayForInt32Key(apache_geode_region_t* region, + const int32_t key, + const char* value, + size_t size) { + RegionWrapper* regionWrapper = reinterpret_cast(region); + regionWrapper->PutByteArray(key, value, size); +} + const char* apache_geode_Region_GetString(apache_geode_region_t* region, const char* key) { RegionWrapper* regionWrapper = reinterpret_cast(region); @@ -121,6 +156,13 @@ void apache_geode_Region_GetByteArray(apache_geode_region_t* region, return regionWrapper->GetByteArray(key, value, size); } +void apache_geode_Region_GetByteArrayForInt32Key(apache_geode_region_t* region, + const int32_t key, + char** value, size_t* size) { + RegionWrapper* regionWrapper = reinterpret_cast(region); + return regionWrapper->GetByteArray(key, value, size); +} + void apache_geode_Region_Remove(apache_geode_region_t* region, const char* key) { RegionWrapper* regionWrapper = reinterpret_cast(region); diff --git a/c-bindings/src/region.hpp b/c-bindings/src/region.hpp index 603a2c7..b2e1392 100644 --- a/c-bindings/src/region
[geode-native] 02/03: WIP: Test generic Put/Get
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 5cd4b7151894e5e99ce0a840fb8d41c421c87da1 Author: Mike Martell AuthorDate: Wed Sep 22 08:40:06 2021 -0700 WIP: Test generic Put/Get --- netcore/NetCore.Test/RegionFactoryTest.cs | 7 +++ netcore/NetCore/RegionFactory.cs | 12 2 files changed, 19 insertions(+) diff --git a/netcore/NetCore.Test/RegionFactoryTest.cs b/netcore/NetCore.Test/RegionFactoryTest.cs index 970109f..4076349 100644 --- a/netcore/NetCore.Test/RegionFactoryTest.cs +++ b/netcore/NetCore.Test/RegionFactoryTest.cs @@ -38,6 +38,7 @@ namespace Apache.Geode.Client { public class RegionFactoryTest { private const string Username1 = "rtimmons"; private const string Username2 = "scharles"; +private const string Username3 = "michael"; private void createPool(IGeodeCache cache, int port) { using var poolManager = cache.PoolManager; @@ -53,11 +54,15 @@ namespace Apache.Geode.Client { region.PutString(Username1, fullname1); region.PutString(Username2, fullname2); + region.Put(Username3,779); + var value3 = region.Get(Username3); + var user1 = region.GetString(Username1); var user2 = region.GetString(Username2); Assert.Equal(user1, fullname1); Assert.Equal(user2, fullname2); + Assert.Equal(779, value3); } private void DoRemoves(Region region) { @@ -75,6 +80,8 @@ namespace Apache.Geode.Client { RegionShortcut regionType) { using var regionFactory = cache.CreateRegionFactory(regionType); using var region = regionFactory.CreateRegion(regionName); + //using var region = regionFactory.CreateGenericRegion(regionName); + //Region region = regionFactory.CreateRegion(regionName); doPutsAndGets(region); DoRemoves(region); diff --git a/netcore/NetCore/RegionFactory.cs b/netcore/NetCore/RegionFactory.cs index 0cf2fd9..e17b118 100644 --- a/netcore/NetCore/RegionFactory.cs +++ b/netcore/NetCore/RegionFactory.cs @@ -39,4 +39,16 @@ namespace Apache.Geode.Client { _containedObject = IntPtr.Zero; } } + + //public class RegionFactory { + // RegionFactory regionFactory_; + // public RegionFactory(IntPtr cache, RegionShortcut regionType) + // { + //regionFactory_ = new RegionFactory(cache, regionType); + // } + // public Region CreateRegion(string regionName) + // { + //return new regionFactory_.CreateRegion(regionName); + // } + //} }
[geode-native] branch wip-bytearray-for-values created (now 198ac47)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 198ac47 Support for 32-bit keys/values - includes signed and unsigned This branch includes the following new commits: new c9bb910 WIP: Generic Put/Get new 5cd4b71 WIP: Test generic Put/Get new 198ac47 Support for 32-bit keys/values - includes signed and unsigned The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 01/03: WIP: Generic Put/Get
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git commit c9bb9106b42ab39b510b26be937c099f7b5d7949 Author: Mike Martell AuthorDate: Wed Sep 22 08:34:52 2021 -0700 WIP: Generic Put/Get --- netcore/NetCore/Region.cs | 70 +++ 1 file changed, 70 insertions(+) diff --git a/netcore/NetCore/Region.cs b/netcore/NetCore/Region.cs index 68d49a5..7b6e400 100644 --- a/netcore/NetCore/Region.cs +++ b/netcore/NetCore/Region.cs @@ -71,6 +71,43 @@ namespace Apache.Geode.Client { Marshal.FreeCoTaskMem(valuePtr); } +public void Put(TKey key, TValue value) +{ + // This is a generic, so can't do any marshaling directly. + if (key.GetType() == typeof(string)) + { +var type = value.GetType(); +if (!type.IsSerializable) + throw new Exception("Error: Object is not Serializable."); +//using (var _fs = new System.IO.MemoryStream()) +//{ +// var _formatter = new BinaryFormatter(); +// _formatter.Serialize(_fs, value); +// PutByteArray(key.ToString(), _fs.ToArray()); +//} +if (value.GetType() == typeof(int)) { + //PutByteArray(key.ToString(), BitConverter.GetBytes(Convert.ToInt32(value))); + var byteArray = new byte[4]; + Array.Copy(BitConverter.GetBytes(Convert.ToInt32(value)), byteArray, 4); + PutByteArray(key.ToString(), byteArray); +} + + } + else { +throw new NotImplementedException(); + } +} + +public int Get(TKey key) +{ + // This is a generic, so can't do any marshaling directly. + //if (key.GetType() == typeof(string)) + { +var value = GetByteArray(key.ToString()); +return BitConverter.ToInt32(value); + } +} + public string GetString(string key) { var keyPtr = Marshal.StringToCoTaskMemUTF8(key); var result = @@ -111,4 +148,37 @@ namespace Apache.Geode.Client { _containedObject = IntPtr.Zero; } } + + // public class GenericRegion : Region + // { + //// private Region regionBase_; + //internal GenericRegion(IntPtr regionFactory, string regionName) {} + // //{ + // // //regionBase_ = new Region(regionFactory, regionName); + // // var regionNamePtr = Marshal.StringToCoTaskMemUTF8(regionName); + // //_containedObject = apache_geode_RegionFactory_CreateRegion(regionFactory, regionNamePtr); + // //Marshal.FreeCoTaskMem(regionNamePtr); + // //} + + //} + + public class Region + { +Region region_; +internal Region(RegionFactory regionFactory, string regionName) +{ + region_ = regionFactory.CreateRegion(regionName); +} + +public TVal Get(TKey key) +{ + // This is a generic, so can't do any marshaling directly. + //if (key.GetType() == typeof(string)) + { +var value = region_.GetByteArray(key.ToString()); +return (TVal)Convert.ChangeType(value, typeof(TVal)); +//return BitConverter.ToInt32(value); + } +} + } }
[geode-native] branch develop updated: GEODE-9608: Remove Release config, add Opimization and pdb (#877)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 0d80d60 GEODE-9608: Remove Release config, add Opimization and pdb (#877) 0d80d60 is described below commit 0d80d600e456f51a385a5500eca40ac602b7603c Author: Michael Martell AuthorDate: Mon Oct 4 15:23:00 2021 -0700 GEODE-9608: Remove Release config, add Opimization and pdb (#877) --- .../asp-netcore-session-sample.csproj | 15 + .../netcore-integration-test.csproj| 68 +- netcore/netcore-lib/netcore-lib.csproj | 17 +- .../netcore-session-integration-test.csproj| 18 +- netcore/netcore-session/netcore-session.csproj | 16 + 5 files changed, 103 insertions(+), 31 deletions(-) diff --git a/netcore/asp-netcore-session-sample/asp-netcore-session-sample.csproj b/netcore/asp-netcore-session-sample/asp-netcore-session-sample.csproj index 3928293..347da91 100644 --- a/netcore/asp-netcore-session-sample/asp-netcore-session-sample.csproj +++ b/netcore/asp-netcore-session-sample/asp-netcore-session-sample.csproj @@ -3,11 +3,26 @@ netcoreapp3.1 x64 + Debug;RelWithDebInfo + + true + + pdbonly + true + + + + true + + true + pdbonly + true + diff --git a/netcore/netcore-integration-test/netcore-integration-test.csproj b/netcore/netcore-integration-test/netcore-integration-test.csproj index 78dc7b4..01fc77c 100644 --- a/netcore/netcore-integration-test/netcore-integration-test.csproj +++ b/netcore/netcore-integration-test/netcore-integration-test.csproj @@ -1,32 +1,44 @@ - -netcoreapp3.1 - -false - -x64 - -Debug;Release;RelWithDebInfo - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - -PreserveNewest - - + + netcoreapp3.1 + false + x64 + Debug;RelWithDebInfo + + + + + + +all +runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + PreserveNewest + + + + + true + + pdbonly + true + + + + true + + true + pdbonly + true + diff --git a/netcore/netcore-lib/netcore-lib.csproj b/netcore/netcore-lib/netcore-lib.csproj index 0258bf1..35ae18e 100644 --- a/netcore/netcore-lib/netcore-lib.csproj +++ b/netcore/netcore-lib/netcore-lib.csproj @@ -5,7 +5,22 @@ Apache.Geode.NetCore Apache.Geode.NetCore x64 -Debug;Release;RelWithDebInfo +Debug;RelWithDebInfo + + true + + pdbonly + true + + + + true + + true + pdbonly + true + + diff --git a/netcore/netcore-session-integration-test/netcore-session-integration-test.csproj b/netcore/netcore-session-integration-test/netcore-session-integration-test.csproj index de4d070..e8a76d7 100644 --- a/netcore/netcore-session-integration-test/netcore-session-integration-test.csproj +++ b/netcore/netcore-session-integration-test/netcore-session-integration-test.csproj @@ -2,10 +2,9 @@ netcoreapp3.1 - false - x64 + Debug;RelWithDebInfo @@ -20,4 +19,19 @@ + + true + + pdbonly + true + + + + true + + true + pdbonly + true + + diff --git a/netcore/netcore-session/netcore-session.csproj b/netcore/netcore-session/netcore-session.csproj index 41d119d..3621586 100644 --- a/netcore/netcore-session/netcore-session.csproj +++ b/netcore/netcore-session/netcore-session.csproj @@ -3,6 +3,7 @@ netcoreapp3.1 x64 + Debug;RelWithDebInfo @@ -14,4 +15,19 @@ + + true + + pdbonly + true + + + + true + + true + pdbonly + true + +
[geode-native] branch develop updated: GEODE-9609: Fix Warning in SessionState (#869)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 1bfc74e GEODE-9609: Fix Warning in SessionState (#869) 1bfc74e is described below commit 1bfc74eea17bba74226ffc6192ede0c459c2f261 Author: Michael Martell AuthorDate: Wed Sep 29 12:52:19 2021 -0700 GEODE-9609: Fix Warning in SessionState (#869) --- netcore/netcore-session/NetCoreSessionState.cs | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/netcore/netcore-session/NetCoreSessionState.cs b/netcore/netcore-session/NetCoreSessionState.cs index 95b0434..4bf0b88 100644 --- a/netcore/netcore-session/NetCoreSessionState.cs +++ b/netcore/netcore-session/NetCoreSessionState.cs @@ -74,7 +74,6 @@ namespace Apache.Geode.Session { public class GeodeSessionStateCache : GeodeNativeObject, IDistributedCache { private readonly IGeodeCache _cache; -private ILogger _logger; private static Region _region; private string _logLevel; private string _logFile; @@ -276,19 +275,9 @@ namespace Apache.Geode.Session { } _connectLock.Wait(); - try { -using var regionFactory = _cache.CreateRegionFactory(RegionShortcut.Proxy); -try { - _logger?.LogTrace("Create CacheRegion"); - _region = regionFactory.CreateRegion(_regionName); - _logger?.LogTrace("CacheRegion created"); -} catch (Exception e) { - _logger?.LogInformation(e, "Create CacheRegion failed... now trying to get the region"); -} - } finally { -// regionFactory?.Dispose(); -_connectLock.Release(); - } + using var regionFactory = _cache.CreateRegionFactory(RegionShortcut.Proxy); + _region = regionFactory.CreateRegion(_regionName); + _connectLock.Release(); } protected override void DestroyContainedObject() {
[geode-native] 02/03: WIP: Test generic Put/Get
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 5cd4b7151894e5e99ce0a840fb8d41c421c87da1 Author: Mike Martell AuthorDate: Wed Sep 22 08:40:06 2021 -0700 WIP: Test generic Put/Get --- netcore/NetCore.Test/RegionFactoryTest.cs | 7 +++ netcore/NetCore/RegionFactory.cs | 12 2 files changed, 19 insertions(+) diff --git a/netcore/NetCore.Test/RegionFactoryTest.cs b/netcore/NetCore.Test/RegionFactoryTest.cs index 970109f..4076349 100644 --- a/netcore/NetCore.Test/RegionFactoryTest.cs +++ b/netcore/NetCore.Test/RegionFactoryTest.cs @@ -38,6 +38,7 @@ namespace Apache.Geode.Client { public class RegionFactoryTest { private const string Username1 = "rtimmons"; private const string Username2 = "scharles"; +private const string Username3 = "michael"; private void createPool(IGeodeCache cache, int port) { using var poolManager = cache.PoolManager; @@ -53,11 +54,15 @@ namespace Apache.Geode.Client { region.PutString(Username1, fullname1); region.PutString(Username2, fullname2); + region.Put(Username3,779); + var value3 = region.Get(Username3); + var user1 = region.GetString(Username1); var user2 = region.GetString(Username2); Assert.Equal(user1, fullname1); Assert.Equal(user2, fullname2); + Assert.Equal(779, value3); } private void DoRemoves(Region region) { @@ -75,6 +80,8 @@ namespace Apache.Geode.Client { RegionShortcut regionType) { using var regionFactory = cache.CreateRegionFactory(regionType); using var region = regionFactory.CreateRegion(regionName); + //using var region = regionFactory.CreateGenericRegion(regionName); + //Region region = regionFactory.CreateRegion(regionName); doPutsAndGets(region); DoRemoves(region); diff --git a/netcore/NetCore/RegionFactory.cs b/netcore/NetCore/RegionFactory.cs index 0cf2fd9..e17b118 100644 --- a/netcore/NetCore/RegionFactory.cs +++ b/netcore/NetCore/RegionFactory.cs @@ -39,4 +39,16 @@ namespace Apache.Geode.Client { _containedObject = IntPtr.Zero; } } + + //public class RegionFactory { + // RegionFactory regionFactory_; + // public RegionFactory(IntPtr cache, RegionShortcut regionType) + // { + //regionFactory_ = new RegionFactory(cache, regionType); + // } + // public Region CreateRegion(string regionName) + // { + //return new regionFactory_.CreateRegion(regionName); + // } + //} }
[geode-native] branch wip-bytearray-for-values created (now 198ac47)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 198ac47 Support for 32-bit keys/values - includes signed and unsigned This branch includes the following new commits: new c9bb910 WIP: Generic Put/Get new 5cd4b71 WIP: Test generic Put/Get new 198ac47 Support for 32-bit keys/values - includes signed and unsigned The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 03/03: Support for 32-bit keys/values - includes signed and unsigned
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 198ac47d176d70bab097aee984d264d62f17a224 Author: Mike Martell AuthorDate: Wed Sep 22 21:38:46 2021 -0700 Support for 32-bit keys/values - includes signed and unsigned --- c-bindings/include/geode/region.h | 7 c-bindings/src/region.cpp | 42 +++ c-bindings/src/region.hpp | 4 ++ netcore/NetCore.Test/RegionFactoryTest.cs | 8 netcore/NetCore/Region.cs | 67 +-- 5 files changed, 125 insertions(+), 3 deletions(-) diff --git a/c-bindings/include/geode/region.h b/c-bindings/include/geode/region.h index 7355d04..6c99232 100644 --- a/c-bindings/include/geode/region.h +++ b/c-bindings/include/geode/region.h @@ -42,12 +42,19 @@ APACHE_GEODE_C_EXPORT void apache_geode_Region_PutString( APACHE_GEODE_C_EXPORT void apache_geode_Region_PutByteArray( apache_geode_region_t* region, const char* key, const char* value, size_t size); +APACHE_GEODE_C_EXPORT void apache_geode_Region_PutByteArrayForInt32Key( +apache_geode_region_t* region, int32_t key, const char* value, +size_t size); + APACHE_GEODE_C_EXPORT const char* apache_geode_Region_GetString( apache_geode_region_t* region, const char* key); APACHE_GEODE_C_EXPORT void apache_geode_Region_GetByteArray( apache_geode_region_t* region, const char* key, char** value, size_t* size); +APACHE_GEODE_C_EXPORT void apache_geode_Region_GetByteArrayForInt32Key( +apache_geode_region_t* region, const int32_t key, char** value, size_t* size); + APACHE_GEODE_C_EXPORT void apache_geode_Region_Remove( apache_geode_region_t* region, const char* key); diff --git a/c-bindings/src/region.cpp b/c-bindings/src/region.cpp index 500506b..707ed4f 100644 --- a/c-bindings/src/region.cpp +++ b/c-bindings/src/region.cpp @@ -55,6 +55,12 @@ void RegionWrapper::PutByteArray(const std::string& key, const char* value, region_->put(key, apache::geode::client::CacheableBytes::create(val)); } +void RegionWrapper::PutByteArray(const int32_t key, const char* value, + size_t size) { + std::vector val(value, value + size); + region_->put(key, apache::geode::client::CacheableBytes::create(val)); +} + const char* RegionWrapper::GetString(const std::string& key) { auto value = region_->get(key); lastValue_ = @@ -84,6 +90,27 @@ void RegionWrapper::GetByteArray(const std::string& key, char** value, } } +void RegionWrapper::GetByteArray(const int32_t key, char** value, + size_t* size) { + std::shared_ptr val = region_->get(key); + + if (val.get() == nullptr) return; + + auto bytes = + std::dynamic_pointer_cast(val); + int valSize = val->objectSize(); +#if defined(_WIN32) + int8_t* byteArray = static_cast(CoTaskMemAlloc(valSize)); +#else + int8_t* byteArray = static_cast(malloc(valSize)); +#endif + if (bytes) { +memcpy(byteArray, bytes->value().data(), valSize); +*value = reinterpret_cast(byteArray); +*size = valSize; + } +} + void RegionWrapper::Remove(const std::string& key) { region_->remove(key); } bool RegionWrapper::ContainsValueForKey(const std::string& key) { @@ -108,6 +135,14 @@ void apache_geode_Region_PutByteArray(apache_geode_region_t* region, regionWrapper->PutByteArray(key, value, size); } +void apache_geode_Region_PutByteArrayForInt32Key(apache_geode_region_t* region, + const int32_t key, + const char* value, + size_t size) { + RegionWrapper* regionWrapper = reinterpret_cast(region); + regionWrapper->PutByteArray(key, value, size); +} + const char* apache_geode_Region_GetString(apache_geode_region_t* region, const char* key) { RegionWrapper* regionWrapper = reinterpret_cast(region); @@ -121,6 +156,13 @@ void apache_geode_Region_GetByteArray(apache_geode_region_t* region, return regionWrapper->GetByteArray(key, value, size); } +void apache_geode_Region_GetByteArrayForInt32Key(apache_geode_region_t* region, + const int32_t key, + char** value, size_t* size) { + RegionWrapper* regionWrapper = reinterpret_cast(region); + return regionWrapper->GetByteArray(key, value, size); +} + void apache_geode_Region_Remove(apache_geode_region_t* region, const char* key) { RegionWrapper* regionWrapper = reinterpret_cast(region); diff --git a/c-bindings/src/region.hpp b/c-bindings/src/region.hpp index 603a2c7..b2e1392 100644 --- a/c-bindings/src/region
[geode-native] 01/03: WIP: Generic Put/Get
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch wip-bytearray-for-values in repository https://gitbox.apache.org/repos/asf/geode-native.git commit c9bb9106b42ab39b510b26be937c099f7b5d7949 Author: Mike Martell AuthorDate: Wed Sep 22 08:34:52 2021 -0700 WIP: Generic Put/Get --- netcore/NetCore/Region.cs | 70 +++ 1 file changed, 70 insertions(+) diff --git a/netcore/NetCore/Region.cs b/netcore/NetCore/Region.cs index 68d49a5..7b6e400 100644 --- a/netcore/NetCore/Region.cs +++ b/netcore/NetCore/Region.cs @@ -71,6 +71,43 @@ namespace Apache.Geode.Client { Marshal.FreeCoTaskMem(valuePtr); } +public void Put(TKey key, TValue value) +{ + // This is a generic, so can't do any marshaling directly. + if (key.GetType() == typeof(string)) + { +var type = value.GetType(); +if (!type.IsSerializable) + throw new Exception("Error: Object is not Serializable."); +//using (var _fs = new System.IO.MemoryStream()) +//{ +// var _formatter = new BinaryFormatter(); +// _formatter.Serialize(_fs, value); +// PutByteArray(key.ToString(), _fs.ToArray()); +//} +if (value.GetType() == typeof(int)) { + //PutByteArray(key.ToString(), BitConverter.GetBytes(Convert.ToInt32(value))); + var byteArray = new byte[4]; + Array.Copy(BitConverter.GetBytes(Convert.ToInt32(value)), byteArray, 4); + PutByteArray(key.ToString(), byteArray); +} + + } + else { +throw new NotImplementedException(); + } +} + +public int Get(TKey key) +{ + // This is a generic, so can't do any marshaling directly. + //if (key.GetType() == typeof(string)) + { +var value = GetByteArray(key.ToString()); +return BitConverter.ToInt32(value); + } +} + public string GetString(string key) { var keyPtr = Marshal.StringToCoTaskMemUTF8(key); var result = @@ -111,4 +148,37 @@ namespace Apache.Geode.Client { _containedObject = IntPtr.Zero; } } + + // public class GenericRegion : Region + // { + //// private Region regionBase_; + //internal GenericRegion(IntPtr regionFactory, string regionName) {} + // //{ + // // //regionBase_ = new Region(regionFactory, regionName); + // // var regionNamePtr = Marshal.StringToCoTaskMemUTF8(regionName); + // //_containedObject = apache_geode_RegionFactory_CreateRegion(regionFactory, regionNamePtr); + // //Marshal.FreeCoTaskMem(regionNamePtr); + // //} + + //} + + public class Region + { +Region region_; +internal Region(RegionFactory regionFactory, string regionName) +{ + region_ = regionFactory.CreateRegion(regionName); +} + +public TVal Get(TKey key) +{ + // This is a generic, so can't do any marshaling directly. + //if (key.GetType() == typeof(string)) + { +var value = region_.GetByteArray(key.ToString()); +return (TVal)Convert.ChangeType(value, typeof(TVal)); +//return BitConverter.ToInt32(value); + } +} + } }
[geode-native] 05/05: GEODE-9559: Forgot to rm _GFCLI_CACHEABLEHASHSET_DEF_GENERIC
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9559-demacroize-clicache in repository https://gitbox.apache.org/repos/asf/geode-native.git commit afe9584917027e2c9e94db3fa8eb25e092a8cc3c Author: Mike Martell AuthorDate: Sat Aug 28 13:31:45 2021 -0700 GEODE-9559: Forgot to rm _GFCLI_CACHEABLEHASHSET_DEF_GENERIC --- clicache/src/CacheableHashSet.hpp | 57 --- 1 file changed, 57 deletions(-) diff --git a/clicache/src/CacheableHashSet.hpp b/clicache/src/CacheableHashSet.hpp index d3c42fb..920f1c6 100644 --- a/clicache/src/CacheableHashSet.hpp +++ b/clicache/src/CacheableHashSet.hpp @@ -604,63 +604,6 @@ namespace Apache }; } -#define _GFCLI_CACHEABLEHASHSET_DEF_GENERIC(m, HSTYPE) \ - public ref class m : public Internal::CacheableHashSetType(native::internal::DSCode::m), HSTYPE> \ -{ \ - public: \ -/** - * Allocates a new empty instance. - * - */ \ - inline m()\ - : Internal::CacheableHashSetType(native::internal::DSCode::m), HSTYPE>() {} \ - \ - /** - * Allocates a new instance with the given size. - * - * the initial size of the new instance - */ \ - inline m(System::Int32 size) \ - : Internal::CacheableHashSetType(native::internal::DSCode::m), HSTYPE>(size) {} \ - \ - /** -* Static function to create a new empty instance. -* -*/ \ -inline static m^ Create() \ - { \ - return gcnew m(); \ - } \ - \ - /** - * Static function to create a new instance with the given size. - * - */ \ - inline static m^ Create(System::Int32 size) \ - { \ - return gcnew m(size); \ - } \ - \ - /* - * Factory function to register this class. - * - */ \ - static ISerializable^ CreateDeserializable()\ - { \ - return gcnew m(); \ - } \ - \ -internal: \ - static ISerializable^ Create(std::shared_ptr obj)\ - { \ - return gcnew m(obj);\ - } \ - \ -private: \ - inline m(std::shared_ptr nativeptr)\ - : Internal::CacheableHashSetType(native::internal::DSCode::m), HSTYPE>(nativeptr) { } \ - }; - /// /// A mutable ICacheableKey hash set wrapper that can serve as /// a distributable object for caching.
[geode-native] 03/05: GEODE-9559: Demacroize _GFCLI_CACHEABLE_KEY_DEF_NEW
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9559-demacroize-clicache in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 6f61439c258d8458fca331e439e46b3b29fde5ce Author: Mike Martell AuthorDate: Sat Aug 28 13:09:27 2021 -0700 GEODE-9559: Demacroize _GFCLI_CACHEABLE_KEY_DEF_NEW --- clicache/src/CacheableBuiltins.hpp | 91 -- 1 file changed, 9 insertions(+), 82 deletions(-) diff --git a/clicache/src/CacheableBuiltins.hpp b/clicache/src/CacheableBuiltins.hpp index 94bcf0e..b93968f 100644 --- a/clicache/src/CacheableBuiltins.hpp +++ b/clicache/src/CacheableBuiltins.hpp @@ -356,129 +356,56 @@ namespace Apache } }; - - - - //n = native type - //m = CacheableInt(managed cacheable) - //mt = managed type(bool, int) -#define _GFCLI_CACHEABLE_KEY_DEF_NEW(n, m, mt) \ - ref class m : public CacheableBuiltinKey(DSCode::m)> \ - { \ - public: \ - /** - * Allocates a new instance with the given value. - * - * the value of the new instance - */ \ - inline m() \ - : CacheableBuiltinKey() { } \ - /** - * Allocates a new instance with the given value. - * - * the value of the new instance - */ \ - inline m(mt value) \ - : CacheableBuiltinKey(value) { }\ - /** - * Static function to create a new instance given value. - * - * the value of the new instance - */ \ - inline static m^ Create(mt value) \ - { \ - return gcnew m(value); \ - } \ - /** -* Explicit conversion operator to contained value type. -* -*/ \ -inline static explicit operator mt (m^ value) \ - { \ - return value->Value; \ - } \ - \ - /** -* Factory function to register this class. -* -*/ \ -static ISerializable^ CreateDeserializable() \ - { \ - return gcnew m(); \ - } \ - \ - internal: \ - static ISerializable^ Create(std::shared_ptr obj)\ - { \ - return (obj != nullptr ? gcnew m(obj) : nullptr); \ - } \ - \ - private: \ - inline m(std::shared_ptr nativeptr) \ - : CacheableBuiltinKey(nativeptr) { } \ - }; - - - - // Built-in CacheableKeys /// /// An immutable wrapper for booleans that can serve /// as a distributable key object for caching. /// - _GFCLI_CACHEABLE_KEY_DEF_NEW(native::CacheableBoolean, - CacheableBoolean, bool); + ref class CacheableBoolean : public CacheableBuiltinKey(DSCode::CacheableBoolean)> { public: inline CacheableBoolean() : CacheableBuiltinKey() { } inline CacheableBoolean(bool value) : CacheableBuiltinKey(value) { } inline static CacheableBoolean^ Create(bool value) { return gcnew CacheableBoolean(value); } inline static explicit operator bool (Cacheab
[geode-native] 04/05: GEODE-9559: Demacroize _GFCLI_CACHEABLEHASHSET_DEF_GENERIC
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9559-demacroize-clicache in repository https://gitbox.apache.org/repos/asf/geode-native.git commit c8af94e12a4b420e079cf8a2cb6a13ce0e1298cc Author: Mike Martell AuthorDate: Sat Aug 28 13:29:08 2021 -0700 GEODE-9559: Demacroize _GFCLI_CACHEABLEHASHSET_DEF_GENERIC --- clicache/src/CacheableHashSet.hpp | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clicache/src/CacheableHashSet.hpp b/clicache/src/CacheableHashSet.hpp index 31a9a8a..d3c42fb 100644 --- a/clicache/src/CacheableHashSet.hpp +++ b/clicache/src/CacheableHashSet.hpp @@ -665,8 +665,7 @@ namespace Apache /// A mutable ICacheableKey hash set wrapper that can serve as /// a distributable object for caching. /// - _GFCLI_CACHEABLEHASHSET_DEF_GENERIC(CacheableHashSet, - apache::geode::client::CacheableHashSet); + public ref class CacheableHashSet : public Internal::CacheableHashSetType(native::internal::DSCode::CacheableHashSet), apache::geode::client::CacheableHashSet> { public: inline CacheableHashSet() : Internal::CacheableHashSetType(native::internal::DSCode::CacheableHashSet), apache::geode::client::CacheableHashSet>() {} inline CacheableHashSet(System::Int32 size) : Internal::CacheableHashSetType(native::internal::DSCode::Cac [...] /// /// A mutable ICacheableKey hash set wrapper that can serve as @@ -675,8 +674,7 @@ namespace Apache /// CacheableHashSet i.e. does not provide the linked semantics of /// java LinkedHashSet. /// - _GFCLI_CACHEABLEHASHSET_DEF_GENERIC(CacheableLinkedHashSet, - apache::geode::client::CacheableLinkedHashSet); + public ref class CacheableLinkedHashSet : public Internal::CacheableHashSetType(native::internal::DSCode::CacheableLinkedHashSet), apache::geode::client::CacheableLinkedHashSet> { public: inline CacheableLinkedHashSet() : Internal::CacheableHashSetType(native::internal::DSCode::CacheableLinkedHashSet), apache::geode::client::CacheableLinkedHashSet>() {} inline CacheableLinkedHashSet(System::Int32 size) : Internal::CacheableHashSetType
[geode-native] branch GEODE-9559-demacroize-clicache created (now afe9584)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9559-demacroize-clicache in repository https://gitbox.apache.org/repos/asf/geode-native.git. at afe9584 GEODE-9559: Forgot to rm _GFCLI_CACHEABLEHASHSET_DEF_GENERIC This branch includes the following new commits: new b34490c Demacroize: - _GF_MG_EXCEPTION_TRY2 - _GF_MG_EXCEPTION_CATCH_ALL2 new 6b2a668 Demacroize: DEF3 and DEF4 new 6f61439 GEODE-9559: Demacroize _GFCLI_CACHEABLE_KEY_DEF_NEW new c8af94e GEODE-9559: Demacroize _GFCLI_CACHEABLEHASHSET_DEF_GENERIC new afe9584 GEODE-9559: Forgot to rm _GFCLI_CACHEABLEHASHSET_DEF_GENERIC The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 02/05: Demacroize: DEF3 and DEF4
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9559-demacroize-clicache in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 6b2a668b36d254507c6a80e9cccf726147b779b2 Author: Mike Martell AuthorDate: Sat Aug 28 08:51:44 2021 -0700 Demacroize: DEF3 and DEF4 --- clicache/src/ExceptionTypes.hpp | 285 1 file changed, 143 insertions(+), 142 deletions(-) diff --git a/clicache/src/ExceptionTypes.hpp b/clicache/src/ExceptionTypes.hpp index 00a9716..83181b8 100644 --- a/clicache/src/ExceptionTypes.hpp +++ b/clicache/src/ExceptionTypes.hpp @@ -267,87 +267,87 @@ namespace Apache }; /// Creates a class x named for each exception y. -#define _GF_MG_EXCEPTION_DEF4(x,y) \ - [Serializable] \ - public ref class x: public GeodeException \ - { \ - public: \ - \ -/** Default constructor */ \ -x( ) \ - : GeodeException( ) { } \ -\ -/** - * Constructor to create an exception object with the given message. - * - * The exception message. - */ \ -x( String^ message ) \ - : GeodeException( message ) { } \ -\ -/** - * Constructor to create an exception object with the given message - * and with the given inner exception. - * - * The exception message. - * The inner exception object. - */ \ -x( String^ message, System::Exception^ innerException ) \ - : GeodeException( message, innerException ) { } \ -\ - protected: \ - \ -/** - * Initializes a new instance of the class with serialized data. - * This allows deserialization of this exception in .NET remoting. - * - * - * holds the serialized object data about the exception being thrown - * - * - * contains contextual information about the source or destination - * - */ \ -x( SerializationInfo^ info, StreamingContext context ) \ - : GeodeException( info, context ) { } \ - \ - internal: \ -x(const apache::geode::client::y& nativeEx) \ - : GeodeException(marshal_as(nativeEx.getMessage()), \ - gcnew GeodeException(GeodeException::GetStackTrace( \ -nativeEx))) { } \ -\ -x(const apache::geode::client::y& nativeEx, Exception^ innerException) \ - : GeodeException(marshal_as(nativeEx.getMessage()), \ - innerException) { } \ -\ -static GeodeException^ Create(const apache::geode::client::Exception& ex, \ -Exception^ innerException) \ -{ \ - const apache::geode::client::y* nativeEx = dynamic_cast( ); \ - if (nativeEx != nullptr) { \ -if (innerException == nullptr) { \ - return gcnew x(*nativeEx); \ -} \ -else { \ - return gcnew x(*nativeEx, innerException); \ -} \ - } \ - return nullptr; \ -} \ -virtual std::shared_ptr GetNative() override \ -{ \ - auto message = marshal_as(this->Message + ": " + this->StackTrace); \ - if (this->InnerException != nullptr) { \ -auto cause = GeodeException::GetNative(this->InnerException); \ -message += "Caused by: " + cause->getMessage(); \ - } \ - return std::make_shared(message); \ -} \ - } - -/// Creates a class named for each exception x. -#define _GF_MG_EXCEPTION_DEF3(x) _GF_MG_EXCEPTION_DEF4(x,x) +//#define _GF_MG_EXCEPTION_DEF4(x,y) \ +// [Serializable] \ +// public ref class x: public GeodeException \ +// { \ +// public: \ +// \ +///** Default constructor */ \ +//x( ) \ +// : GeodeException( ) { } \ +//\ +///** +// * Constructor to create an exception object with the given message. +// * +// * The exception message. +// */ \ +//x( String^ message ) \ +// : GeodeException( message ) { } \ +//\ +///** +// * Constructor to create an exception object with the given message +// * and with the given inner exception. +// * +// * The exception message. +// * The inner exception object. +// */ \ +//x( String^ message, System::Exception^ innerException ) \ +// : GeodeException( message, innerException ) { } \ +//\ +// protected: \ +// \ +///** +// * Initializes a new instance of the class with serialized data. +// * This allows deserialization of this exception in .NET remoting. +// * +// * +// * holds the serializ
[geode-native] branch develop updated: GEODE-9464: Add Asp.Net Core session state sample application (#856)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 597ab21 GEODE-9464: Add Asp.Net Core session state sample application (#856) 597ab21 is described below commit 597ab211c7182ceab8942816f9adbe49d3af3b8f Author: Michael Martell AuthorDate: Thu Aug 26 13:33:36 2021 -0700 GEODE-9464: Add Asp.Net Core session state sample application (#856) * Add AspNetCore GeodeSession Sample * Create region for sessionState in startserver * Add Apache license header --- .../AspNetCore GeodeSession Sample.csproj | 13 ++ .../AspNetCore GeodeSession Sample.csproj.user | 6 + .../Extensions/SessionExtensions.cs| 53 + .../Middleware/HttpContextItemsMiddleware.cs | 45 .../Models/BasicAuthInitialize.cs | 47 .../Models/ErrorViewModel.cs | 27 +++ .../Pages/Error.cshtml | 42 .../Pages/Error.cshtml.cs | 36 .../Pages/Index.cshtml | 99 + .../Pages/Index.cshtml.cs | 62 ++ .../Pages/Shared/_Layout.cshtml| 237 + .../Pages/_ViewImports.cshtml | 19 ++ .../Pages/_ViewStart.cshtml| 19 ++ netcore/AspNetCore GeodeSession Sample/Program.cs | 29 +++ .../Properties/launchSettings.json | 28 +++ netcore/AspNetCore GeodeSession Sample/README.md | 58 + netcore/AspNetCore GeodeSession Sample/Startup.cs | 79 +++ .../appsettings.Development.json | 9 + .../appsettings.Production.json| 9 + .../appsettings.json | 17 ++ netcore/geode-dotnet-core.sln | 7 + netcore/scripts/startserver.ps1| 8 +- netcore/scripts/startserver.sh | 4 +- 23 files changed, 948 insertions(+), 5 deletions(-) diff --git a/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj new file mode 100644 index 000..fb587cb --- /dev/null +++ b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj @@ -0,0 +1,13 @@ + + + +netcoreapp3.1 +x64 + + + + + + + + diff --git a/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj.user b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj.user new file mode 100644 index 000..9dd7dfa --- /dev/null +++ b/netcore/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj.user @@ -0,0 +1,6 @@ + +http://schemas.microsoft.com/developer/msbuild/2003;> + +IIS Express + + diff --git a/netcore/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs b/netcore/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs new file mode 100644 index 000..367ee56 --- /dev/null +++ b/netcore/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System.Text.Json; +using Microsoft.AspNetCore.Http; + +namespace Web.Extensions { +#region snippet1 + public static class SessionExtensions { +public static void Set(this ISession session, string key, T value) { + session.SetString(key, JsonSerializer.Serialize(value)); +} + +public static T Get(this ISession session, string key) { + var value = session.GetString(key); + return value == null ? default : JsonSerializer.Deserialize(value); +} + } +#endregion +} + +namespace Web.Extensions2 { + // Alternate approach + + public static class SessionExtensions { +public static void Set(this ISession session, string key, T value) { + session.SetString(key, JsonSerializer.Serialize(value)); +} + +public static bool TryGet(this ISession session, s
[geode-native] branch develop updated: GEODE-9511: Update ACE cmake config for VS2019 (#847)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 9221b91 GEODE-9511: Update ACE cmake config for VS2019 (#847) 9221b91 is described below commit 9221b915bcb6dbac468fa0f1232163f48b3034b4 Author: Michael Martell AuthorDate: Wed Aug 18 21:28:53 2021 -0700 GEODE-9511: Update ACE cmake config for VS2019 (#847) --- dependencies/ACE/CMakeLists.txt | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dependencies/ACE/CMakeLists.txt b/dependencies/ACE/CMakeLists.txt index dd546e3..ee2c042 100644 --- a/dependencies/ACE/CMakeLists.txt +++ b/dependencies/ACE/CMakeLists.txt @@ -79,7 +79,7 @@ if (${WIN32}) set ( _CONFIGURE_COMMAND ${MPC} -static ${MPC_FLAGS} -name_modifier "*_${MPC_TYPE}_static" -value_template MultiProcessorCompilation=true - -value_template WindowsTargetPlatformVersion=${CMAKE_SYSTEM_VERSION} + -value_template WindowsTargetPlatformVersion=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} -value_template staticflags+=__ACE_INLINE__ -value_template staticflags+=ACE_BUILD_DLL -value_template staticflags+=ACE_AS_STATIC_LIBS @@ -89,9 +89,14 @@ if (${WIN32}) ) set ( _INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory /lib /lib COMMAND ${CMAKE_COMMAND} -E copy_directory /ace /include/ace - COMMAND ${CMAKE_COMMAND} -E copy /ace/Static_$<$:Debug>$<$>:Release>/ace_${MPC_TYPE}_static/AMD64/ACE_${MPC_TYPE}_static.pdb /lib ) + if(MSVC_TOOLSET_VERSION LESS 142) +set ( _INSTALL_COMMAND ${_INSTALL_COMMAND} + COMMAND ${CMAKE_COMMAND} -E copy /ace/Static_$<$:Debug>$<$>:Release>/ace_${MPC_TYPE}_static/AMD64/ACE_${MPC_TYPE}_static.pdb /lib +) + endif() + set(CMAKE_STATIC_LIBRARY_SUFFIX s$<${MSVC}:$<$:d>>.lib) else()
[geode-native] 01/01: GEODE-9511: Update ACE cmake config for VS2019
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9511-allow-default-sdk-for-ACE in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 2d459a60355906b3494c08ee805a22628125d109 Author: Mike Martell AuthorDate: Wed Aug 18 13:30:18 2021 -0700 GEODE-9511: Update ACE cmake config for VS2019 --- dependencies/ACE/CMakeLists.txt | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dependencies/ACE/CMakeLists.txt b/dependencies/ACE/CMakeLists.txt index dd546e3..ee2c042 100644 --- a/dependencies/ACE/CMakeLists.txt +++ b/dependencies/ACE/CMakeLists.txt @@ -79,7 +79,7 @@ if (${WIN32}) set ( _CONFIGURE_COMMAND ${MPC} -static ${MPC_FLAGS} -name_modifier "*_${MPC_TYPE}_static" -value_template MultiProcessorCompilation=true - -value_template WindowsTargetPlatformVersion=${CMAKE_SYSTEM_VERSION} + -value_template WindowsTargetPlatformVersion=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} -value_template staticflags+=__ACE_INLINE__ -value_template staticflags+=ACE_BUILD_DLL -value_template staticflags+=ACE_AS_STATIC_LIBS @@ -89,9 +89,14 @@ if (${WIN32}) ) set ( _INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory /lib /lib COMMAND ${CMAKE_COMMAND} -E copy_directory /ace /include/ace - COMMAND ${CMAKE_COMMAND} -E copy /ace/Static_$<$:Debug>$<$>:Release>/ace_${MPC_TYPE}_static/AMD64/ACE_${MPC_TYPE}_static.pdb /lib ) + if(MSVC_TOOLSET_VERSION LESS 142) +set ( _INSTALL_COMMAND ${_INSTALL_COMMAND} + COMMAND ${CMAKE_COMMAND} -E copy /ace/Static_$<$:Debug>$<$>:Release>/ace_${MPC_TYPE}_static/AMD64/ACE_${MPC_TYPE}_static.pdb /lib +) + endif() + set(CMAKE_STATIC_LIBRARY_SUFFIX s$<${MSVC}:$<$:d>>.lib) else()
[geode-native] branch GEODE-9511-allow-default-sdk-for-ACE created (now 2d459a6)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9511-allow-default-sdk-for-ACE in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 2d459a6 GEODE-9511: Update ACE cmake config for VS2019 This branch includes the following new commits: new 2d459a6 GEODE-9511: Update ACE cmake config for VS2019 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] branch develop updated: GEODE-9501: Works with toolset Microsoft v142 (#841)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 95c6b5e GEODE-9501: Works with toolset Microsoft v142 (#841) 95c6b5e is described below commit 95c6b5ee53f9c8b7525fd34885cd9f3284d579d4 Author: Michael Martell AuthorDate: Mon Aug 16 11:06:32 2021 -0700 GEODE-9501: Works with toolset Microsoft v142 (#841) * Use default WindowsSDK for ACE * Cleaner Windows tools configuration --- ci/base/base.yml| 4 ++-- dependencies/ACE/CMakeLists.txt | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ci/base/base.yml b/ci/base/base.yml index 60ba0d5..c44a101 100644 --- a/ci/base/base.yml +++ b/ci/base/base.yml @@ -61,7 +61,7 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + CMAKE_CONFIGURE_FLAGS: "" CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP" @@ -72,7 +72,7 @@ builds: with_dot_net: #@ True #@yaml/map-key-override params: - CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0" + CMAKE_CONFIGURE_FLAGS: "" CMAKE_BUILD_FLAGS: "/m" CPACK_GENERATORS: "ZIP" diff --git a/dependencies/ACE/CMakeLists.txt b/dependencies/ACE/CMakeLists.txt index dd546e3..9298ce2 100644 --- a/dependencies/ACE/CMakeLists.txt +++ b/dependencies/ACE/CMakeLists.txt @@ -79,7 +79,6 @@ if (${WIN32}) set ( _CONFIGURE_COMMAND ${MPC} -static ${MPC_FLAGS} -name_modifier "*_${MPC_TYPE}_static" -value_template MultiProcessorCompilation=true - -value_template WindowsTargetPlatformVersion=${CMAKE_SYSTEM_VERSION} -value_template staticflags+=__ACE_INLINE__ -value_template staticflags+=ACE_BUILD_DLL -value_template staticflags+=ACE_AS_STATIC_LIBS @@ -89,7 +88,6 @@ if (${WIN32}) ) set ( _INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory /lib /lib COMMAND ${CMAKE_COMMAND} -E copy_directory /ace /include/ace - COMMAND ${CMAKE_COMMAND} -E copy /ace/Static_$<$:Debug>$<$>:Release>/ace_${MPC_TYPE}_static/AMD64/ACE_${MPC_TYPE}_static.pdb /lib ) set(CMAKE_STATIC_LIBRARY_SUFFIX s$<${MSVC}:$<$:d>>.lib)
[geode-native] branch GEODE-9472-fix-verifyNoLeakedThreads updated (ee56462 -> 26e2e50)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9472-fix-verifyNoLeakedThreads in repository https://gitbox.apache.org/repos/asf/geode-native.git. from ee56462 GEODE-9472: Relax the ratio of before and after threads. add 26e2e50 Use Assert.True for readability. No new revisions were added by this update. Summary of changes: clicache/integration-test2/GarbageCollectCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[geode-native] branch GEODE-9472-fix-verifyNoLeakedThreads created (now ee56462)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9472-fix-verifyNoLeakedThreads in repository https://gitbox.apache.org/repos/asf/geode-native.git. at ee56462 GEODE-9472: Relax the ratio of before and after threads. This branch includes the following new commits: new ee56462 GEODE-9472: Relax the ratio of before and after threads. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 01/01: GEODE-9472: Relax the ratio of before and after threads.
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9472-fix-verifyNoLeakedThreads in repository https://gitbox.apache.org/repos/asf/geode-native.git commit ee56462efea30a7d527c7533fd6d7cb3242eaa2d Author: Mike Martell AuthorDate: Wed Jul 28 09:43:21 2021 -0700 GEODE-9472: Relax the ratio of before and after threads. --- clicache/integration-test2/GarbageCollectCache.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clicache/integration-test2/GarbageCollectCache.cs b/clicache/integration-test2/GarbageCollectCache.cs index 90c671c..88a6cf2 100644 --- a/clicache/integration-test2/GarbageCollectCache.cs +++ b/clicache/integration-test2/GarbageCollectCache.cs @@ -83,10 +83,9 @@ namespace Apache.Geode.Client.IntegrationTests // environment startup. if (i > 5) { -//Assert.True(.8 < ratio && ratio < 1.3); string error = "ncThreadsBefore = " + ncThreadsBefore.ToString() + ", ncThreadsAfter = " + ncThreadsAfter.ToString(); -Assert.False(!(.8 < ratio && ratio < 1.3), error); +Assert.False(!(.5 < ratio && ratio < 2.0), error); } } }
[geode-dotnet-core-client] branch AddNonSteeltoeSample created (now bebc715)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch AddNonSteeltoeSample in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git. at bebc715 GEODE-9359: Delete Steeltoe sample This branch includes the following new commits: new 6594f20 GEODE-9464: Add a non-Steeltoe Asp.Net Core web app new ff7e02e GEODE-9359: Add netcore-session to geode-native new bebc715 GEODE-9359: Delete Steeltoe sample The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-dotnet-core-client] 01/03: GEODE-9464: Add a non-Steeltoe Asp.Net Core web app
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch AddNonSteeltoeSample in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 6594f20bb85ac9c9ed6b7d94b6e48dbef3bffee7 Author: Mike Martell AuthorDate: Tue Jul 27 16:46:00 2021 -0700 GEODE-9464: Add a non-Steeltoe Asp.Net Core web app --- .../AspNetCore GeodeSession Sample.csproj | 13 .../Extensions/SessionExtensions.cs| 44 + .../Middleware/HttpContextItemsMiddleware.cs | 36 +++ .../Models/BasicAuthInitialize.cs | 31 + .../Models/ErrorViewModel.cs | 11 AspNetCore GeodeSession Sample/Pages/Error.cshtml | 26 .../Pages/Error.cshtml.cs | 23 +++ AspNetCore GeodeSession Sample/Pages/Index.cshtml | 72 + .../Pages/Index.cshtml.cs | 71 + .../Pages/Shared/_Layout.cshtml| 14 .../Pages/_ViewImports.cshtml | 3 + .../Pages/_ViewStart.cshtml| 3 + AspNetCore GeodeSession Sample/Program.cs | 17 + .../Properties/launchSettings.json | 28 AspNetCore GeodeSession Sample/README.md | 58 + .../SessionSampleNoSteeltoe.sln| 31 + AspNetCore GeodeSession Sample/Startup.cs | 74 ++ .../appsettings.Development.json | 9 +++ .../appsettings.Production.json| 9 +++ AspNetCore GeodeSession Sample/appsettings.json| 17 + 20 files changed, 590 insertions(+) diff --git a/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj b/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj new file mode 100644 index 000..a3ed1f8 --- /dev/null +++ b/AspNetCore GeodeSession Sample/AspNetCore GeodeSession Sample.csproj @@ -0,0 +1,13 @@ + + + +netcoreapp3.1 +AnyCPU;x64;x86 + + + + + + + + diff --git a/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs b/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs new file mode 100644 index 000..8b5035e --- /dev/null +++ b/AspNetCore GeodeSession Sample/Extensions/SessionExtensions.cs @@ -0,0 +1,44 @@ +using System.Text.Json; +using Microsoft.AspNetCore.Http; + +namespace Web.Extensions +{ +#region snippet1 +public static class SessionExtensions +{ +public static void Set(this ISession session, string key, T value) +{ +session.SetString(key, JsonSerializer.Serialize(value)); +} + +public static T Get(this ISession session, string key) +{ +var value = session.GetString(key); +return value == null ? default : JsonSerializer.Deserialize(value); +} +} +#endregion +} + +namespace Web.Extensions2 +{ +// Alternate approach + +public static class SessionExtensions +{ +public static void Set(this ISession session, string key, T value) +{ +session.SetString(key, JsonSerializer.Serialize(value)); +} + +public static bool TryGet(this ISession session, string key, out T value) +{ +var state = session.GetString(key); +value = default; +if (state == null) +return false; +value = JsonSerializer.Deserialize(state); +return true; +} +} +} \ No newline at end of file diff --git a/AspNetCore GeodeSession Sample/Middleware/HttpContextItemsMiddleware.cs b/AspNetCore GeodeSession Sample/Middleware/HttpContextItemsMiddleware.cs new file mode 100644 index 000..6a8597c --- /dev/null +++ b/AspNetCore GeodeSession Sample/Middleware/HttpContextItemsMiddleware.cs @@ -0,0 +1,36 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; + +namespace SessionSample.Middleware +{ +#region snippet1 +public class HttpContextItemsMiddleware +{ +private readonly RequestDelegate _next; +public static readonly object HttpContextItemsMiddlewareKey = new Object(); + +public HttpContextItemsMiddleware(RequestDelegate next) +{ +_next = next; +} + +public async Task Invoke(HttpContext httpContext) +{ +httpContext.Items[HttpContextItemsMiddlewareKey] = "K-9"; + +await _next(httpContext); +} +} + +public static class HttpContextItemsMiddlewareExtensions +{ +public static IApplicationBuilder +UseHttpContextItemsMiddleware(this IApplicationBuilder app) +{ +return app.UseMiddleware(); +} +} +#endregion +} diff --git a/AspNetCore GeodeSession Sam
[geode-dotnet-core-client] 03/03: GEODE-9359: Delete Steeltoe sample
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch AddNonSteeltoeSample in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit bebc71500e0b987117970b3faa22878b4f310516 Author: Mike Martell AuthorDate: Tue Jul 27 16:58:53 2021 -0700 GEODE-9359: Delete Steeltoe sample --- SessionSample/Extensions/SessionExtensions.cs | 44 .../Middleware/HttpContextItemsMiddleware.cs | 36 -- SessionSample/Models/BasicAuthInitialize.cs| 31 SessionSample/Models/ErrorViewModel.cs | 11 --- SessionSample/Pages/Error.cshtml | 26 --- SessionSample/Pages/Error.cshtml.cs| 23 -- SessionSample/Pages/Index.cshtml | 72 --- SessionSample/Pages/Index.cshtml.cs| 77 SessionSample/Pages/Shared/_Layout.cshtml | 14 SessionSample/Pages/_ViewImports.cshtml| 3 - SessionSample/Pages/_ViewStart.cshtml | 3 - SessionSample/Program.cs | 17 - SessionSample/Properties/launchSettings.json | 28 SessionSample/SessionSample.csproj | 21 -- SessionSample/SessionSample.csproj.user| 6 -- SessionSample/SessionSample.sln| 31 SessionSample/Startup.cs | 79 - SessionSample/appsettings.Development.json | 9 --- SessionSample/appsettings.Production.json | 9 --- SessionSample/appsettings.json | 8 --- SessionSample/statArchive-19444.gfs| Bin 10402 -> 0 bytes SessionSample/statArchive-20992.gfs| Bin 7654 -> 0 bytes SessionSample/statArchive-23496.gfs| Bin 14196 -> 0 bytes SessionSample/statArchive-23824.gfs| Bin 67316 -> 0 bytes SessionSample/statArchive-25408.gfs| Bin 10608 -> 0 bytes SessionSample/statArchive-4448.gfs | Bin 60278 -> 0 bytes 26 files changed, 548 deletions(-) diff --git a/SessionSample/Extensions/SessionExtensions.cs b/SessionSample/Extensions/SessionExtensions.cs deleted file mode 100644 index 8b5035e..000 --- a/SessionSample/Extensions/SessionExtensions.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Text.Json; -using Microsoft.AspNetCore.Http; - -namespace Web.Extensions -{ -#region snippet1 -public static class SessionExtensions -{ -public static void Set(this ISession session, string key, T value) -{ -session.SetString(key, JsonSerializer.Serialize(value)); -} - -public static T Get(this ISession session, string key) -{ -var value = session.GetString(key); -return value == null ? default : JsonSerializer.Deserialize(value); -} -} -#endregion -} - -namespace Web.Extensions2 -{ -// Alternate approach - -public static class SessionExtensions -{ -public static void Set(this ISession session, string key, T value) -{ -session.SetString(key, JsonSerializer.Serialize(value)); -} - -public static bool TryGet(this ISession session, string key, out T value) -{ -var state = session.GetString(key); -value = default; -if (state == null) -return false; -value = JsonSerializer.Deserialize(state); -return true; -} -} -} \ No newline at end of file diff --git a/SessionSample/Middleware/HttpContextItemsMiddleware.cs b/SessionSample/Middleware/HttpContextItemsMiddleware.cs deleted file mode 100644 index 6a8597c..000 --- a/SessionSample/Middleware/HttpContextItemsMiddleware.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Http; - -namespace SessionSample.Middleware -{ -#region snippet1 -public class HttpContextItemsMiddleware -{ -private readonly RequestDelegate _next; -public static readonly object HttpContextItemsMiddlewareKey = new Object(); - -public HttpContextItemsMiddleware(RequestDelegate next) -{ -_next = next; -} - -public async Task Invoke(HttpContext httpContext) -{ -httpContext.Items[HttpContextItemsMiddlewareKey] = "K-9"; - -await _next(httpContext); -} -} - -public static class HttpContextItemsMiddlewareExtensions -{ -public static IApplicationBuilder -UseHttpContextItemsMiddleware(this IApplicationBuilder app) -{ -return app.UseMiddleware(); -} -} -#endregion -} diff --git a/SessionSample/Models/BasicAuthInitialize.cs b/SessionSample/Models/BasicAuthIni
[geode-dotnet-core-client] 02/03: GEODE-9359: Add netcore-session to geode-native
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch AddNonSteeltoeSample in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit ff7e02e9a58767bcf24a43b77f9c1a873f6c6c82 Author: Mike Martell AuthorDate: Tue Jul 27 16:52:33 2021 -0700 GEODE-9359: Add netcore-session to geode-native --- .../NetCore.Session.IntegrationTests.csproj| 0 .../Properties/launchSettings.json | 0 .../SessionStateIntegrationTests.cs| 10 ++--- .../NetCore.Session.Tests.csproj | 0 .../SessionStateCacheTests.cs | 0 .../GeodeCacheServiceCollectionExtensions.cs | 28 + NetCore.Session/GeodeSessionStateCacheOptions.cs | 16 NetCore.Session/NetCoreSessionState.cs | 46 +- geode-dotnet-core.sln | 46 +- 9 files changed, 113 insertions(+), 33 deletions(-) diff --git a/Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj b/NetCore.Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj similarity index 100% rename from Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj rename to NetCore.Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj diff --git a/Session.IntegrationTests/Properties/launchSettings.json b/NetCore.Session.IntegrationTests/Properties/launchSettings.json similarity index 100% rename from Session.IntegrationTests/Properties/launchSettings.json rename to NetCore.Session.IntegrationTests/Properties/launchSettings.json diff --git a/Session.IntegrationTests/SessionStateIntegrationTests.cs b/NetCore.Session.IntegrationTests/SessionStateIntegrationTests.cs similarity index 94% rename from Session.IntegrationTests/SessionStateIntegrationTests.cs rename to NetCore.Session.IntegrationTests/SessionStateIntegrationTests.cs index 52538df..eafb590 100644 --- a/Session.IntegrationTests/SessionStateIntegrationTests.cs +++ b/NetCore.Session.IntegrationTests/SessionStateIntegrationTests.cs @@ -24,7 +24,7 @@ namespace Apache.Geode.Session.IntegrationTests using var poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); using var pool = poolFactory.CreatePool("myPool"); -using var ssCache = new SessionStateCache(cache, _regionName); +using var ssCache = new GeodeSessionStateCache(cache, _regionName); var options = new DistributedCacheEntryOptions(); DateTime localTime = DateTime.Now.AddDays(1); @@ -48,7 +48,7 @@ namespace Apache.Geode.Session.IntegrationTests using PoolFactory poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); using var pool = poolFactory.CreatePool("myPool"); -using var ssCache = new SessionStateCache(cache, _regionName); +using var ssCache = new GeodeSessionStateCache(cache, _regionName); var options = new DistributedCacheEntryOptions(); int numSeconds = 20; @@ -81,7 +81,7 @@ namespace Apache.Geode.Session.IntegrationTests using var cache = (Cache)cacheFactory.CreateCache(); PoolFactory poolFactory = cache.PoolFactory; -using var ssCache = new SessionStateCache(cache, _regionName); +using var ssCache = new GeodeSessionStateCache(cache, _regionName); var options = new DistributedCacheEntryOptions(); options.AbsoluteExpiration = DateTime.Now.AddSeconds(5); @@ -102,7 +102,7 @@ namespace Apache.Geode.Session.IntegrationTests using var poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); using var pool = poolFactory.CreatePool("myPool"); -using var ssCache = new SessionStateCache(cache, _regionName); +using var ssCache = new GeodeSessionStateCache(cache, _regionName); var options = new DistributedCacheEntryOptions(); DateTime localTime = DateTime.Now.AddDays(1); @@ -129,7 +129,7 @@ namespace Apache.Geode.Session.IntegrationTests using var poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); using var pool = poolFactory.CreatePool("myPool"); -using var ssCache = new SessionStateCache(cache, _regionName); +using var ssCache = new GeodeSessionStateCache(cache, _regionName); var options = new DistributedCacheEntryOptions(); DateTime localTime = DateTime.Now.AddDays(1); diff --git a/Session.Tests/NetCore.Session.Tests.csproj b/NetCore.Session.Tests/NetCore.Session.Tests.csproj similarity index 100% rename from Session.Tests/NetCore.Session.Tests.csproj rename to NetCore.Session.Tests/NetCore.Session.Tests.csproj diff --git a/Session.Tests/SessionStateCacheTests.cs b/NetCore.Session
[geode-dotnet-core-client] branch GEODE-9356-create-ci updated: Mostly support for non-Steeltoe sample
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git The following commit(s) were added to refs/heads/GEODE-9356-create-ci by this push: new f9cbf66 Mostly support for non-Steeltoe sample f9cbf66 is described below commit f9cbf66109cc2a7a0924e1ed97df8e8ab012138b Author: Mike Martell AuthorDate: Mon Jul 19 13:54:36 2021 -0700 Mostly support for non-Steeltoe sample --- NetCore.Session/NetCore.Session.csproj | 3 +- .../NetCoreCacheServiceCollectionExtensions.cs | 39 ++ NetCore.Session/NetCoreSessionStateOptions.cs | 31 NetCore.Test/NetCore.Test.csproj | 2 +- NetCore/Constants.cs | 2 +- SessionSample/Startup.cs | 5 +- .../Extensions/SessionExtensions.cs| 44 +++ .../Middleware/HttpContextItemsMiddleware.cs | 36 + .../Models/BasicAuthInitialize.cs | 31 SessionSampleNoSteeltoe/Models/ErrorViewModel.cs | 11 +++ SessionSampleNoSteeltoe/Pages/Error.cshtml | 26 +++ SessionSampleNoSteeltoe/Pages/Error.cshtml.cs | 23 ++ SessionSampleNoSteeltoe/Pages/Index.cshtml | 72 + SessionSampleNoSteeltoe/Pages/Index.cshtml.cs | 77 ++ .../Pages/Shared/_Layout.cshtml| 14 SessionSampleNoSteeltoe/Pages/_ViewImports.cshtml | 3 + SessionSampleNoSteeltoe/Pages/_ViewStart.cshtml| 3 + SessionSampleNoSteeltoe/Program.cs | 20 + .../Properties/launchSettings.json | 28 +++ .../SessionSampleNoSteeltoe.csproj | 13 .../SessionSampleNoSteeltoe.csproj.user| 6 ++ .../SessionSampleNoSteeltoe.sln| 31 SessionSampleNoSteeltoe/Startup.cs | 91 ++ .../appsettings.Development.json | 9 +++ .../appsettings.Production.json| 9 +++ SessionSampleNoSteeltoe/appsettings.json | 8 ++ ci/pipeline.yml| 1 + geode-dotnet-core.sln | 37 + 28 files changed, 669 insertions(+), 6 deletions(-) diff --git a/NetCore.Session/NetCore.Session.csproj b/NetCore.Session/NetCore.Session.csproj index e7585bb..a21c47f 100644 --- a/NetCore.Session/NetCore.Session.csproj +++ b/NetCore.Session/NetCore.Session.csproj @@ -1,12 +1,13 @@ -net5.0 +netcoreapp3.1 AnyCPU;x64 + diff --git a/NetCore.Session/NetCoreCacheServiceCollectionExtensions.cs b/NetCore.Session/NetCoreCacheServiceCollectionExtensions.cs new file mode 100644 index 000..e20873f --- /dev/null +++ b/NetCore.Session/NetCoreCacheServiceCollectionExtensions.cs @@ -0,0 +1,39 @@ +using System; +using Microsoft.Extensions.Caching.Distributed; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; + +namespace Apache.Geode.Session +{ +/// +/// Extension methods for setting up NetCore distributed cache related services in an . +/// +public static class SessionStateCacheServiceCollectionExtensions +{ +/// +/// Adds Geode distributed caching services to the specified . +/// +/// The to add services to. +/// An to configure the provided +/// . +/// The so that additional calls can be chained. +public static IServiceCollection AddsSessionStateCache(this IServiceCollection services, Action setupAction) +{ +if (services == null) +{ +throw new ArgumentNullException(nameof(services)); +} + +if (setupAction == null) +{ +throw new ArgumentNullException(nameof(setupAction)); +} + +services.AddOptions(); +services.Configure(setupAction); +//services.Add(ServiceDescriptor.Singleton()); + +return services; +} +} +} diff --git a/NetCore.Session/NetCoreSessionStateOptions.cs b/NetCore.Session/NetCoreSessionStateOptions.cs new file mode 100644 index 000..00998d2 --- /dev/null +++ b/NetCore.Session/NetCoreSessionStateOptions.cs @@ -0,0 +1,31 @@ +using Microsoft.Extensions.Options; + +namespace Apache.Geode.Session +{ +/// +/// Configuration options for . +/// +public class SessionStateCacheOptions : IOptions +{ +/// +/// The configuration used to connect to SessionStateCache. +/// +public string Configuration { get; set; } + +/// +/// The configuration used to connect to SessionStateCache. +/// This is preferred over Configuration. +/// +//public
[geode-native] branch develop updated: GEODE-9401: fix duplicate defines mac (#825)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new db9f9f2 GEODE-9401: fix duplicate defines mac (#825) db9f9f2 is described below commit db9f9f2e4caae97444a5db6d9a6b7b1b653ff6a7 Author: Michael Martell AuthorDate: Sat Jun 26 05:41:45 2021 -0700 GEODE-9401: fix duplicate defines mac (#825) * Refactor rename constants PdxTypes::BYTE_SIZE, PAGE_SIZE and similar variables * Follow style guide naming convention for constants --- clicache/src/impl/PdxFieldType.cpp | 18 - clicache/src/impl/PdxInstanceFactoryImpl.cpp | 18 - clicache/src/impl/PdxReaderWithTypeCollector.cpp | 26 ++--- clicache/src/impl/PdxWriterWithTypeCollector.cpp | 26 ++--- .../integration-test/testOverflowPutGetSqLite.cpp | 12 +++--- cppcache/src/PdxFieldType.cpp | 44 +++--- cppcache/src/PdxInstanceFactory.cpp| 20 +- cppcache/src/PdxReaderWithTypeCollector.cpp| 36 +- cppcache/src/PdxTypes.hpp | 18 - cppcache/src/PdxWriterWithTypeCollector.cpp| 18 - cppcache/test/PdxTypeTest.cpp | 12 +++--- 11 files changed, 124 insertions(+), 124 deletions(-) diff --git a/clicache/src/impl/PdxFieldType.cpp b/clicache/src/impl/PdxFieldType.cpp index 543fcd4..87ad5b7 100644 --- a/clicache/src/impl/PdxFieldType.cpp +++ b/clicache/src/impl/PdxFieldType.cpp @@ -166,23 +166,23 @@ namespace Apache switch (m_typeId) { case PdxFieldTypes::BYTE: -return PdxTypes::BYTE_SIZE; +return PdxTypes::kPdxByteSize; case PdxFieldTypes::BOOLEAN: -return PdxTypes::BOOLEAN_SIZE; +return PdxTypes::kPdxBooleanSize; case PdxFieldTypes::SHORT: -return PdxTypes::SHORT_SIZE; +return PdxTypes::kPdxShortSize; case PdxFieldTypes::CHAR: -return PdxTypes::CHAR_SIZE; +return PdxTypes::kPdxCharSize; case PdxFieldTypes::INT: -return PdxTypes::INTEGER_SIZE; +return PdxTypes::kPdxIntegerSize; case PdxFieldTypes::FLOAT: -return PdxTypes::FLOAT_SIZE; +return PdxTypes::kPdxFloatSize; case PdxFieldTypes::LONG: -return PdxTypes::LONG_SIZE; +return PdxTypes::kPdxLongSize; case PdxFieldTypes::DOUBLE: -return PdxTypes::DOUBLE_SIZE; +return PdxTypes::kPdxDoubleSize; case PdxFieldTypes::DATE: -return PdxTypes::DATE_SIZE; +return PdxTypes::kPdxDateSize; default: return -1; diff --git a/clicache/src/impl/PdxInstanceFactoryImpl.cpp b/clicache/src/impl/PdxInstanceFactoryImpl.cpp index 5b09927..fb9af97 100644 --- a/clicache/src/impl/PdxInstanceFactoryImpl.cpp +++ b/clicache/src/impl/PdxInstanceFactoryImpl.cpp @@ -64,7 +64,7 @@ namespace Apache IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteChar(String^ fieldName, Char value) { isFieldAdded(fieldName); - m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::CHAR_SIZE); + m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::kPdxCharSize); m_FieldVsValues->Add(fieldName, value); return this; } @@ -72,7 +72,7 @@ namespace Apache IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteBoolean(String^ fieldName, Boolean value) { isFieldAdded(fieldName); - m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::BOOLEAN_SIZE); + m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::kPdxBooleanSize); m_FieldVsValues->Add(fieldName, value); return this; } @@ -80,7 +80,7 @@ namespace Apache IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteByte(String^ fieldName, SByte value) { isFieldAdded(fieldName); - m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE); + m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize); m_FieldVsValues->Add(fieldName, value); return this; } @@ -88,7 +88,7 @@ namespace Apache IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteShort(String^ fieldName, Int16 value) { isFieldAdded(fieldName); - m_pdxType->AddFi
[geode-dotnet-core-client] 02/05: Update resources
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 5109bf8d7a7e7ba19e8ab787e7e6f4759e4bf99b Author: Mike Martell AuthorDate: Sun Jun 13 15:34:27 2021 -0700 Update resources --- ci/pipeline.yml | 66 +++-- 1 file changed, 8 insertions(+), 58 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 8cfb411..df78a79 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -1355,17 +1355,9 @@ resources: ignore_paths: [] paths: - ci/* -uri: https://github.com/apache/geode-native.git +uri: https://github.com/apache/geode-dotnet-core-client.git type: git - icon: docker - name: clang-tools-image - source: -password: ((concourse-gcp-key)) -repository: gcr.io/apachegeode-ci/geode-native-clang-tools -tag: latest -username: _json_key - type: docker-image -- icon: docker name: gcloud-image source: password: ((concourse-gcp-key)) @@ -1382,62 +1374,20 @@ resources: url: https://maven.apachegeode-ci.info/snapshots version: 1\.15\.0-build\..* type: maven-resource -- icon: google-cloud - name: geode-native-develop-build-rhel-7-gci - source: -family: geode-native-develop-build-rhel-7 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource -- icon: google-cloud - name: geode-native-develop-build-rhel-8-gci - source: -family: geode-native-develop-build-rhel-8 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource -- icon: google-cloud - name: geode-native-develop-build-ubuntu-16-04-gci - source: -family: geode-native-develop-build-ubuntu-16-04 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource -- icon: google-cloud - name: geode-native-develop-build-ubuntu-18-04-gci - source: -family: geode-native-develop-build-ubuntu-18-04 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource -- icon: google-cloud - name: geode-native-develop-build-ubuntu-20-04-gci - source: -family: geode-native-develop-build-ubuntu-20-04 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource -- icon: google-cloud - name: geode-native-develop-build-windows-2016-vs-2017-gci - source: -family: geode-native-develop-build-windows-2016-vs-2017 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource -- icon: google-cloud - name: geode-native-develop-build-windows-2019-vs-2019-gci +- icon: archive + name: geode-native-latest source: -family: geode-native-develop-build-windows-2019-vs-2019 -family_project: apachegeode-ci -key: ((concourse-gcp-key)) - type: gci-resource +artifact: org.apache.geode:apache-geode-native:tgz +url: https://apachegeode-ci-concourse/geode-native/geode-native-develop/packages/windows-2019-vs-2019/debug/apache-geode-native-1.14.0-build.1-Windows-64bit.zip +version: 1\.14\.1-build\..* + type: gcs-resource - check_every: 1m icon: github name: source source: access_token: ((github-pr-access-token)) base_branch: develop -repository: apache/geode-native +repository: apache/geode-dotnet-core-client type: github-pr-resource - icon: docker name: task-image
[geode-dotnet-core-client] 05/05: Minimal pipeline
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit ee52add8b994566496e938c699bf462efa51d650 Author: Mike Martell AuthorDate: Mon Jun 14 15:29:35 2021 -0700 Minimal pipeline --- ci/pipeline.yml | 1076 +++ 1 file changed, 51 insertions(+), 1025 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index bd73f64..04c3f86 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -1,1036 +1,62 @@ -groups: -- jobs: - - build-windows-net5-debug - - check-source - name: builds -- jobs: - - update-pipeline - name: meta -- jobs: - - update-pipeline - - build-windows-net5-debug - - check-source - name: all -jobs: -- name: build-windows-net5-debug - plan: - - in_parallel: - fail_fast: true - steps: - - get: version - - get: source -on_success: - try: -attempts: 5 -get_params: - skip_download: true -params: - context: build-windows-2019-vs-2019-debug - description: null - path: source - status: pending -put: pr-status-pending -resource: source -trigger: true -version: every - - get: task-image - - config: - inputs: - - name: source - platform: linux - run: -args: -- -c -- |- - # Cribbed shamelessly from geode/ci/scripts/shared_utilities.sh - is_source_from_pr_testable() { -if [[ $# -ne 3 ]]; then - >&2 echo "Invalid args. Try ${0} \"\" \"\"" - exit 1 -fi -local repo_dir="${1}" -if [[ ! -d "${repo_dir}" ]]; then - # If the repo_dir does not exist, assume call from non-PR - return 0; -fi - -pushd "${repo_dir}" 2>&1 >> /dev/null - local base_dir=$(git rev-parse --show-toplevel) - local github_pr_dir="${base_dir}/.git/resource" - pushd ${base_dir} 2>&1 >> /dev/null -local return_code=0 -if [ -d "${github_pr_dir}" ]; then - # Modify this path list with directories to exclude - local exclude_dirs="${2}" - for d in $(echo ${exclude_dirs}); do -local exclude_pathspec="${exclude_pathspec} :(exclude,glob)${d}/**" - done - local exclude_files="${3}" - for f in "${exclude_files}"; do -local exclude_pathspec="${exclude_pathspec} :(exclude,glob)${f}" - done - pushd ${base_dir} &> /dev/null -local files=$(git diff --name-only $(cat "${github_pr_dir}/base_sha") $(cat "${github_pr_dir}/head_sha") -- . $(echo ${exclude_pathspec})) - popd &> /dev/null - if [[ -z "${files}" ]]; then ->&2 echo "Code changes are from CI only" -return_code=1 - else ->&2 echo "real code change here!" - fi -else - >&2 echo "repo is not from a PR" -fi - popd 2>&1 >> /dev/null -popd 2>&1 >> /dev/null -return ${return_code} - } - - exclude_dirs="ci packer docker tools" - exclude_files="*/*.md" - is_source_from_pr_testable "source" "${exclude_dirs}" "${exclude_files}" && exit 0 || exit 1 -path: bash -image: task-image -on_failure: - do: - - try: - attempts: 5 - get_params: -skip_download: true - params: -context: build-windows-2019-vs-2019-debug -description: Non-code changes are not compiled. -path: source -status: success - put: pr-status-success - resource: source -task: is-source-change - - do: -- do: - - in_parallel: - fail_fast: true - steps: - - get: gcloud-image - - get: geode-native-develop-build-windows-2019-vs-2019-gci - - in_parallel: - fail_fast: true - steps: - - config: - inputs: - - name: geode-native-develop-build-windows-2019-vs-2019-gci -path: image - outputs: - - name: instance - platform: linux -
[geode-dotnet-core-client] branch GEODE-9356-create-ci created (now ee52add)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git. at ee52add Minimal pipeline This branch includes the following new commits: new 6feadfa Just windows net5 debug new 5109bf8 Update resources new 74c589b Remove unnecessary tasks new 6b6ac02 Remove C++ source checks new ee52add Minimal pipeline The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-dotnet-core-client] 04/05: Remove C++ source checks
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 6b6ac029c5f77e723951cdcf7b5f5d68b40e Author: Mike Martell AuthorDate: Sun Jun 13 15:55:10 2021 -0700 Remove C++ source checks --- ci/pipeline.yml | 34 -- 1 file changed, 34 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index b4a94ef..bd73f64 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -627,45 +627,11 @@ jobs: - in_parallel: fail_fast: true steps: - - get: clang-tools-image - get: version - get: source on_success: in_parallel: steps: -- try: -attempts: 5 -get_params: - skip_download: true -params: - context: clang-format - description: null - path: source - status: pending -put: pr-status-pending -resource: source -- try: -attempts: 5 -get_params: - skip_download: true -params: - context: clang-tidy - description: null - path: source - status: pending -put: pr-status-pending -resource: source -- try: -attempts: 5 -get_params: - skip_download: true -params: - context: rat-check - description: null - path: source - status: pending -put: pr-status-pending -resource: source trigger: true version: every - do:
[geode-dotnet-core-client] 01/05: Just windows net5 debug
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 6feadfae93c6859acbde8f9b8320f23efb81d89a Author: Mike Martell AuthorDate: Sun Jun 13 09:54:08 2021 -0700 Just windows net5 debug --- ci/pipeline.yml | 1468 +++ 1 file changed, 1468 insertions(+) diff --git a/ci/pipeline.yml b/ci/pipeline.yml new file mode 100644 index 000..8cfb411 --- /dev/null +++ b/ci/pipeline.yml @@ -0,0 +1,1468 @@ +groups: +- jobs: + - build-windows-net5-debug + - check-source + name: builds +- jobs: + - update-pipeline + name: meta +- jobs: + - update-pipeline + - build-windows-net5-debug + - check-source + name: all +jobs: +- name: build-windows-net5-debug + plan: + - in_parallel: + fail_fast: true + steps: + - get: version + - get: source +on_success: + try: +attempts: 5 +get_params: + skip_download: true +params: + context: build-windows-2019-vs-2019-debug + description: null + path: source + status: pending +put: pr-status-pending +resource: source +trigger: true +version: every + - get: task-image + - config: + inputs: + - name: source + platform: linux + run: +args: +- -c +- |- + # Cribbed shamelessly from geode/ci/scripts/shared_utilities.sh + is_source_from_pr_testable() { +if [[ $# -ne 3 ]]; then + >&2 echo "Invalid args. Try ${0} \"\" \"\"" + exit 1 +fi +local repo_dir="${1}" +if [[ ! -d "${repo_dir}" ]]; then + # If the repo_dir does not exist, assume call from non-PR + return 0; +fi + +pushd "${repo_dir}" 2>&1 >> /dev/null + local base_dir=$(git rev-parse --show-toplevel) + local github_pr_dir="${base_dir}/.git/resource" + pushd ${base_dir} 2>&1 >> /dev/null +local return_code=0 +if [ -d "${github_pr_dir}" ]; then + # Modify this path list with directories to exclude + local exclude_dirs="${2}" + for d in $(echo ${exclude_dirs}); do +local exclude_pathspec="${exclude_pathspec} :(exclude,glob)${d}/**" + done + local exclude_files="${3}" + for f in "${exclude_files}"; do +local exclude_pathspec="${exclude_pathspec} :(exclude,glob)${f}" + done + pushd ${base_dir} &> /dev/null +local files=$(git diff --name-only $(cat "${github_pr_dir}/base_sha") $(cat "${github_pr_dir}/head_sha") -- . $(echo ${exclude_pathspec})) + popd &> /dev/null + if [[ -z "${files}" ]]; then +>&2 echo "Code changes are from CI only" +return_code=1 + else +>&2 echo "real code change here!" + fi +else + >&2 echo "repo is not from a PR" +fi + popd 2>&1 >> /dev/null +popd 2>&1 >> /dev/null +return ${return_code} + } + + exclude_dirs="ci packer docker tools" + exclude_files="*/*.md" + is_source_from_pr_testable "source" "${exclude_dirs}" "${exclude_files}" && exit 0 || exit 1 +path: bash +image: task-image +on_failure: + do: + - try: + attempts: 5 + get_params: +skip_download: true + params: +context: build-windows-2019-vs-2019-debug +description: Non-code changes are not compiled. +path: source +status: success + put: pr-status-success + resource: source +task: is-source-change + - do: +- do: + - in_parallel: + fail_fast: true + steps: + - get: gcloud-image + - get: geode-native-develop-build-windows-2019-vs-2019-gci + - in_parallel: + fail_fast: true + steps: + - config: + inputs: + - name: geode-native-develop-build-windows-2019-vs-2019-gci +path: image + outputs: + - name: instance + platform: linux +
[geode-dotnet-core-client] 03/05: Remove unnecessary tasks
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9356-create-ci in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 74c589be5428fed24688f392afe87dd9e1bbfb98 Author: Mike Martell AuthorDate: Sun Jun 13 15:43:48 2021 -0700 Remove unnecessary tasks --- ci/pipeline.yml | 350 +--- 1 file changed, 1 insertion(+), 349 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index df78a79..b4a94ef 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -473,359 +473,11 @@ jobs: function remote_upload { scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "$1" "${INSTANCE_USER}@${external_ip}:${2}" } -remote_shell cmake -E chdir build/cppcache/test ctest -C ${CMAKE_CONFIG} -j8 --timeout=300 --output-on-failure --repeat until-pass:4 --schedule-random - path: bash - image: task-image - task: cpp-unit-tests - timeout: 30m -- config: -inputs: -- name: instance -params: - CMAKE_BUILD_FLAGS: /m - CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 - CPACK_GENERATORS: ZIP -platform: linux -run: - args: - - -c - - |- -set -ueo pipefail -INSTANCE_USER=build -INSTANCE_DIR=$(pwd)/instance - -if [ ! -d "${INSTANCE_DIR}" ]; then - echo "${INSTANCE_DIR} not found." - exit 1 -fi - -SSH_OPTIONS=${SSH_OPTIONS:-"-o StrictHostKeyChecking=no -o PasswordAuthentication=no"} - -ssh_key_file=${INSTANCE_DIR}/identity -if [ ! -r "${ssh_key_file}" ]; then - echo "${ssh_key_file} not readable." - exit 1 -fi - -instance_file=${INSTANCE_DIR}/instance.sh -if [ ! -r "${instance_file}" ]; then - echo "${instance_file} not readable." - exit 1 -fi - -external_ip=$(source ${instance_file} && echo -n ${networkInterfaces_accessConfigs_natIP}) - -function remote_shell { - ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} "$@" -} - -function remote_download { - scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "${INSTANCE_USER}@${external_ip}:${1}" "$2" -} - -function remote_download_directory { - ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} tar -C $(dirname ${1}) -czf - $(basename ${1}) | tar -C ${2} -zxf - -} - -function remote_upload { - scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "$1" "${INSTANCE_USER}@${external_ip}:${2}" -} -remote_shell cmake -E chdir build/cppcache/integration/test ctest -C ${CMAKE_CONFIG} -j4 --timeout=300 --output-on-failure --repeat until-pass:4 --schedule-random - path: bash - image: task-image - task: cpp-integration-tests - timeout: 1h -- config: -inputs: -- name: instance -params: - CMAKE_BUILD_FLAGS: /m - CMAKE_CONFIG: Debug - CMAKE_CONFIGURE_FLAGS: -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0 - CPACK_GENERATORS: ZIP -platform: linux -run: - args: - - -c - - |- -set -ueo pipefail -INSTANCE_USER=build -INSTANCE_DIR=$(pwd)/instance - -if [ ! -d "${INSTANCE_DIR}" ]; then - echo "${INSTANCE_DIR} not found." - exit 1 -fi - -SSH_OPTIONS=${SSH_OPTIONS:-"-o StrictHostKeyChecking=no -o PasswordAuthentication=no"} - -ssh_key_file=${INSTANCE_DIR}/identity -if [ ! -r "${ssh_key_file}" ]; then - echo "${ssh_key_file} not readable." - exit 1 -fi - -instance_file=${INSTANCE_DIR}/instance.sh -if [ ! -r "${instance_file}" ]; then - echo "${instance_file} not readable." - exit 1 -fi - -external_ip=$(source ${instance_file} && echo -n ${networkInterfaces_accessConfigs_natIP}) - -function remote_shell { - ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} "$@" -} - -function remote_download { - scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "${INSTANCE_USER}@${external_ip}:${1}" "$2" -
[geode-dotnet-core-client] branch develop updated: Fix search/replace error
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git The following commit(s) were added to refs/heads/develop by this push: new 1de160e Fix search/replace error 1de160e is described below commit 1de160ed8fe2e047c415fb13d7ab5aa4f19ed070 Author: Mike Martell AuthorDate: Wed Jun 2 08:00:45 2021 -0700 Fix search/replace error --- NetCore.Test/CacheFactoryUnitTest.cs | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/NetCore.Test/CacheFactoryUnitTest.cs b/NetCore.Test/CacheFactoryUnitTest.cs index 54ea95b..cdcd581 100644 --- a/NetCore.Test/CacheFactoryUnitTest.cs +++ b/NetCore.Test/CacheFactoryUnitTest.cs @@ -2,12 +2,12 @@ using System; using Apache.Geode.NetCore; using Xunit; -namespace GemfireDotNetFact +namespace GemfireDotNetTest { -public class CacheFactoryUnitFacts +public class CacheFactoryUnitTests { [Fact] -public void FactCreateFactory() +public void TestCreateFactory() { using (var client = new Client()) { @@ -19,7 +19,7 @@ namespace GemfireDotNetFact } [Fact] -public void FactCacheFactoryGetVersion() +public void TestCacheFactoryGetVersion() { using (var client = new Client()) { @@ -32,7 +32,7 @@ namespace GemfireDotNetFact } [Fact] -public void FactCacheFactoryGetProductDescription() +public void TestCacheFactoryGetProductDescription() { using (var client = new Client()) { @@ -45,7 +45,7 @@ namespace GemfireDotNetFact } [Fact] -public void FactCacheFactorySetPdxIgnoreUnreadFields() +public void TestCacheFactorySetPdxIgnoreUnreadFields() { using (var client = new Client()) { @@ -58,7 +58,7 @@ namespace GemfireDotNetFact } [Fact] -public void FactCacheFactorySetPdxReadSerialized() +public void TestCacheFactorySetPdxReadSerialized() { using (var client = new Client()) { @@ -71,7 +71,7 @@ namespace GemfireDotNetFact } [Fact] -public void FactCacheFactoryCreateCache() +public void TestCacheFactoryCreateCache() { using (var client = new Client()) { @@ -86,7 +86,7 @@ namespace GemfireDotNetFact } [Fact] -public void FactCacheFactorySetProperty() +public void TestCacheFactorySetProperty() { using (var client = new Client()) {
[geode-dotnet-core-client] branch develop updated: Improve readability of startserver.ps1
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git The following commit(s) were added to refs/heads/develop by this push: new d02e137 Improve readability of startserver.ps1 d02e137 is described below commit d02e137cfdd921cb97e0e7e7d1a7eefd7be0a18a Author: Mike Martell AuthorDate: Tue Jun 1 15:07:32 2021 -0700 Improve readability of startserver.ps1 --- startserver.ps1 | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/startserver.ps1 b/startserver.ps1 index 993d5fb..34c6ec1 100644 --- a/startserver.ps1 +++ b/startserver.ps1 @@ -49,7 +49,17 @@ $AUTH_LOCATOR_OPTS="$AUTH_OPTS --J=-Dgemfire.security-manager=javaobject.SimpleS if ($GFSH_PATH -ne "") { - Invoke-Expression "$GFSH_PATH -e 'start locator --name=locator --port=10334 --http-service-port=6060 --J=-Dgemfire.jmx-manager-port=1099' -e 'start server --name=server --server-port=0' -e 'create region --name=exampleRegion --type=PARTITION'" - Invoke-Expression "$GFSH_PATH -e 'start locator --name=auth_locator $AUTH_LOCATOR_OPTS --port=10335 --http-service-port=7070 --J=-Dgemfire.jmx-manager-port=2099' -e 'connect --locator=localhost[10335] --user=server --password=server' -e 'start server --name=auth_server $AUTH_OPTS --server-port=0' -e 'create region --name=authExampleRegion --type=PARTITION'" + $expression = "$GFSH_PATH " + ` +"-e 'start locator --name=locator --port=10334 --http-service-port=6060 --J=-Dgemfire.jmx-manager-port=1099' " + ` +"-e 'start server --name=server --server-port=0' " + ` +"-e 'create region --name=exampleRegion --type=PARTITION'"; + Invoke-Expression $expression + + $expression = "$GFSH_PATH " + ` +"-e 'start locator --name=auth_locator $AUTH_LOCATOR_OPTS --port=10335 --http-service-port=7070 --J=-Dgemfire.jmx-manager-port=2099' " + ` +"-e 'connect --locator=localhost[10335] --user=server --password=server' " + ` +"-e 'start server --name=auth_server $AUTH_OPTS --server-port=0' " + ` +"-e 'create region --name=authExampleRegion --type=PARTITION'"; + Invoke-Expression $expression } \ No newline at end of file
[geode-dotnet-core-client] branch develop updated: Switch to xUnit
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git The following commit(s) were added to refs/heads/develop by this push: new 69ef33f Switch to xUnit 69ef33f is described below commit 69ef33fbe95786221b2453d5152eff6140e1da91 Author: Mike Martell AuthorDate: Tue Jun 1 11:07:57 2021 -0700 Switch to xUnit --- NetCore.Test/CacheFactoryUnitTest.cs | 57 +++- NetCore.Test/CacheUnitTest.cs | 63 -- NetCore.Test/NetCore.Test.csproj | 10 +++- NetCore.Test/ObjectLeakUnitTest.cs | 9 +--- NetCore.Test/PoolFactoryUnitTest.cs| 16 ++ NetCore.Test/PoolManagerUnitTest.cs| 10 +--- NetCore.Test/RegionFactoryUnitTest.cs | 21 +++- NetCore.Test/xunit.runner.json | 5 ++ .../NetCore.Session.IntegrationTests.csproj| 7 ++- .../SessionStateIntegrationTests.cs| 2 +- 10 files changed, 76 insertions(+), 124 deletions(-) diff --git a/NetCore.Test/CacheFactoryUnitTest.cs b/NetCore.Test/CacheFactoryUnitTest.cs index 20b246a..54ea95b 100644 --- a/NetCore.Test/CacheFactoryUnitTest.cs +++ b/NetCore.Test/CacheFactoryUnitTest.cs @@ -1,60 +1,51 @@ using System; using Apache.Geode.NetCore; -using NUnit.Framework; +using Xunit; -namespace GemfireDotNetTest +namespace GemfireDotNetFact { -public class CacheFactoryUnitTests +public class CacheFactoryUnitFacts { -[SetUp] -public void Setup() -{ -} - -[Test] -public void TestCreateFactory() +[Fact] +public void FactCreateFactory() { using (var client = new Client()) { using (var cacheFactory = CacheFactory.Create()) { -Assert.IsNotNull(cacheFactory); +Assert.NotNull(cacheFactory); } } } -[Test] -public void TestCacheFactoryGetVersion() +[Fact] +public void FactCacheFactoryGetVersion() { using (var client = new Client()) { using (var cacheFactory = CacheFactory.Create()) { var version = cacheFactory.Version; -Assert.AreNotEqual(version, String.Empty); +Assert.NotEqual(version, String.Empty); } - -Assert.Pass(); } } -[Test] -public void TestCacheFactoryGetProductDescription() +[Fact] +public void FactCacheFactoryGetProductDescription() { using (var client = new Client()) { using (var cacheFactory = CacheFactory.Create()) { var description = cacheFactory.ProductDescription; -Assert.AreNotEqual(description, String.Empty); +Assert.NotEqual(description, String.Empty); } - -Assert.Pass(); } } -[Test] -public void TestCacheFactorySetPdxIgnoreUnreadFields() +[Fact] +public void FactCacheFactorySetPdxIgnoreUnreadFields() { using (var client = new Client()) { @@ -63,13 +54,11 @@ namespace GemfireDotNetTest cacheFactory.PdxIgnoreUnreadFields = true; cacheFactory.PdxIgnoreUnreadFields = false; } - -Assert.Pass(); } } -[Test] -public void TestCacheFactorySetPdxReadSerialized() +[Fact] +public void FactCacheFactorySetPdxReadSerialized() { using (var client = new Client()) { @@ -78,13 +67,11 @@ namespace GemfireDotNetTest cacheFactory.PdxReadSerialized = true; cacheFactory.PdxReadSerialized = false; } - -Assert.Pass(); } } -[Test] -public void TestCacheFactoryCreateCache() +[Fact] +public void FactCacheFactoryCreateCache() { using (var client = new Client()) { @@ -95,13 +82,11 @@ namespace GemfireDotNetTest ; } } - -Assert.Pass(); } } -[Test] -public void TestCacheFactorySetProperty() +[Fact] +public void FactCacheFactorySetProperty() { using (var client = new Client()) { @@ -110,8 +95,6 @@ namespace GemfireDotNetTest cacheFactory.SetProperty("log-level&qu
[geode-dotnet-core-client] 04/04: Merge branch 'develop' of https://github.com/apache/geode-dotnet-core-client into develop
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit abda65628f5b641d9e9cc3bbc7684ea0acde904c Merge: edf9a34 aefab27 Author: Mike Martell AuthorDate: Thu May 27 16:50:38 2021 -0700 Merge branch 'develop' of https://github.com/apache/geode-dotnet-core-client into develop NetCore.Test/RegionFactoryUnitTest.cs | 4 +-- startserver.ps1 | 55 +++ startserver.sh| 51 stopserver.ps1| 47 ++ stopserver.sh | 35 ++ 5 files changed, 190 insertions(+), 2 deletions(-)
[geode-dotnet-core-client] 02/04: Add x64 platform
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 6f5668d4fcc5a40c9ad5a6694a3408a5ad35b23e Author: Mike Martell AuthorDate: Thu May 27 13:27:28 2021 -0700 Add x64 platform --- NetCore.Session/NetCore.Session.csproj | 1 + NetCore.Test/NetCore.Test.csproj | 2 ++ NetCore/NetCore.csproj | 1 + .../NetCore.Session.IntegrationTests.csproj | 2 ++ Session.Tests/NetCore.Session.Tests.csproj | 2 ++ SessionSample/SessionSample.csproj | 2 +- geode-dotnet-core.sln| 20 ++-- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/NetCore.Session/NetCore.Session.csproj b/NetCore.Session/NetCore.Session.csproj index 8fb2ee7..e6636a3 100644 --- a/NetCore.Session/NetCore.Session.csproj +++ b/NetCore.Session/NetCore.Session.csproj @@ -2,6 +2,7 @@ netcoreapp3.1 +AnyCPU;x64 diff --git a/NetCore.Test/NetCore.Test.csproj b/NetCore.Test/NetCore.Test.csproj index 02473bb..099a074 100644 --- a/NetCore.Test/NetCore.Test.csproj +++ b/NetCore.Test/NetCore.Test.csproj @@ -4,6 +4,8 @@ netcoreapp3.1 false + +AnyCPU;x64 diff --git a/NetCore/NetCore.csproj b/NetCore/NetCore.csproj index 06e4207..8f01f3f 100644 --- a/NetCore/NetCore.csproj +++ b/NetCore/NetCore.csproj @@ -4,6 +4,7 @@ netcoreapp3.1 Apache.Geode.NetCore Apache.Geode.NetCore +AnyCPU;x64 diff --git a/Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj b/Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj index c4266eb..c026325 100644 --- a/Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj +++ b/Session.IntegrationTests/NetCore.Session.IntegrationTests.csproj @@ -4,6 +4,8 @@ netcoreapp3.1 false + +AnyCPU;x64 diff --git a/Session.Tests/NetCore.Session.Tests.csproj b/Session.Tests/NetCore.Session.Tests.csproj index 9f66ecf..3477d78 100644 --- a/Session.Tests/NetCore.Session.Tests.csproj +++ b/Session.Tests/NetCore.Session.Tests.csproj @@ -4,6 +4,8 @@ netcoreapp3.1 false + +AnyCPU;x64 diff --git a/SessionSample/SessionSample.csproj b/SessionSample/SessionSample.csproj index b2be8d8..bf84de8 100644 --- a/SessionSample/SessionSample.csproj +++ b/SessionSample/SessionSample.csproj @@ -2,7 +2,7 @@ netcoreapp3.1 -AnyCPU;x64 +AnyCPU;x64;x86 diff --git a/geode-dotnet-core.sln b/geode-dotnet-core.sln index 0eb7484..2f1a398 100644 --- a/geode-dotnet-core.sln +++ b/geode-dotnet-core.sln @@ -27,40 +27,40 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|Any CPU.Build.0 = Debug|Any CPU - {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|x64.ActiveCfg = Debug|Any CPU - {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|x64.Build.0 = Debug|Any CPU + {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|x64.ActiveCfg = Debug|x64 + {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Debug|x64.Build.0 = Debug|x64 {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Release|Any CPU.ActiveCfg = Release|Any CPU {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Release|Any CPU.Build.0 = Release|Any CPU {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Release|x64.ActiveCfg = Release|Any CPU {09ABBCE7-B217-43F1-A51B-CC5BDCD8EE98}.Release|x64.Build.0 = Release|Any CPU {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Debug|x64.ActiveCfg = Debug|Any CPU - {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Debug|x64.Build.0 = Debug|Any CPU + {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Debug|x64.ActiveCfg = Debug|x64 + {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Debug|x64.Build.0 = Debug|x64 {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Release|Any CPU.ActiveCfg = Release|Any CPU {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Release|Any CPU.Build.0 = Release|Any CPU {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Release|x64.ActiveCfg = Release|Any CPU {501DEA7E-8985-42A8-8BC9-C073E1B6DFE0}.Release|x64.Build.0 = Release|Any CPU {CC1FEC64-9AD6-4A69-ADF2-038CF67A8590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CC1FEC64-9AD6-4A69-ADF2-038CF67A8590}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CC1FEC64-9AD6-4A69-ADF2
[geode-dotnet-core-client] 03/04: Switch to using statements
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit edf9a349c1360ed327b9d69129f4f6560caef3eb Author: Mike Martell AuthorDate: Thu May 27 16:49:44 2021 -0700 Switch to using statements --- .../SessionStateIntegrationTests.cs| 364 +++-- Session.Tests/SessionStateCacheTests.cs| 11 +- 2 files changed, 202 insertions(+), 173 deletions(-) diff --git a/Session.IntegrationTests/SessionStateIntegrationTests.cs b/Session.IntegrationTests/SessionStateIntegrationTests.cs index 42250b7..7a533f0 100644 --- a/Session.IntegrationTests/SessionStateIntegrationTests.cs +++ b/Session.IntegrationTests/SessionStateIntegrationTests.cs @@ -8,175 +8,201 @@ using System.Threading.Tasks; namespace Apache.Geode.Session.IntegrationTests { - public class SessionStateIntegrationTests - { -private static string _regionName = "testRegion"; - -[Fact] -public void SetGet() -{ - var cacheFactory = CacheFactory.Create() - .SetProperty("log-level", "none") - .SetProperty("log-file", "SessionStateCacheIntegrationTests.log"); - - var cache = (Cache)cacheFactory.CreateCache(); - PoolFactory poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); - var pool = poolFactory.CreatePool("myPool"); - - var ssCache = new SessionStateCache(cache, _regionName); - - var options = new DistributedCacheEntryOptions(); - DateTime localTime = DateTime.Now.AddDays(1); - DateTimeOffset dateAndOffset = new DateTimeOffset(localTime, - TimeZoneInfo.Local.GetUtcOffset(localTime)); - options.AbsoluteExpiration = dateAndOffset; - var testValue = new byte[] { 1, 2, 3, 4, 5 }; - ssCache.Set("testKey", testValue, options); - byte[] value = ssCache.Get("testKey"); - Assert.True(testValue.SequenceEqual(value)); -} - -[Fact] -public void Refresh() -{ - var cacheFactory = CacheFactory.Create() - .SetProperty("log-level", "none") - .SetProperty("log-file", "SessionStateCacheIntegrationTests.log"); - - var cache = (Cache)cacheFactory.CreateCache(); - PoolFactory poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); - var pool = poolFactory.CreatePool("myPool"); - - var ssCache = new SessionStateCache(cache, _regionName); - - var options = new DistributedCacheEntryOptions(); - int numSeconds = 20; - options.SlidingExpiration = new TimeSpan(0, 0, numSeconds); - var testValue = new byte[] { 1, 2, 3, 4, 5 }; - - // Set a value - ssCache.Set("testKey", testValue, options); - - // Wait half a timeout then refresh - System.Threading.Thread.Sleep(numSeconds/2 * 1000); - ssCache.Refresh("testKey"); - - // Wait beyond the original expiration - System.Threading.Thread.Sleep(numSeconds / 2 * 1000 + 1); - - // Ensure it's not expired - byte[] value = ssCache.Get("testKey"); - Assert.True(testValue.SequenceEqual(value)); -} - -[Fact] -public void SetWithAbsoluteExpiration() -{ - var cacheFactory = CacheFactory.Create() - .SetProperty("log-level", "none") - .SetProperty("log-file", "SessionStateCacheIntegrationTests.log"); - - var cache = (Cache)cacheFactory.CreateCache(); - PoolFactory poolFactory = cache.PoolFactory; - - var ssCache = new SessionStateCache(cache, _regionName); - - var options = new DistributedCacheEntryOptions(); - options.AbsoluteExpiration = DateTime.Now.AddSeconds(5); - ssCache.Set("testKey", Encoding.UTF8.GetBytes("testValue"), options); - System.Threading.Thread.Sleep(6000); - byte[] value = ssCache.Get("testKey"); - Assert.Null(value); -} - -[Fact] -public void Remove() -{ - var cacheFactory = CacheFactory.Create() - .SetProperty("log-level", "none") - .SetProperty("log-file", "SessionStateCacheIntegrationTests.log"); - - var cache = (Cache)cacheFactory.CreateCache(); - PoolFactory poolFactory = cache.PoolFactory.AddLocator("localhost", 10334); - var pool = poolFactory.CreatePool("myPool"); - - var ssCache = new SessionStateCache(cache, _regionName); - - var options = new DistributedCacheEntryOptions(); - DateTime localTime = DateTime.Now.AddDays(1); - DateTimeOffset dateAndOffset = new DateTimeOffset(localTime, - TimeZoneInfo.Local.GetUtcOffset(localTime)); - options.AbsoluteExpirat
[geode-dotnet-core-client] 01/04: Derive SessionStateCache from GeodeNativeObject
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git commit 5468ffacf2ab2ee5aabbd7f0a5d18281ceef27c1 Author: Mike Martell AuthorDate: Thu May 27 13:26:16 2021 -0700 Derive SessionStateCache from GeodeNativeObject --- NetCore.Session/NetCoreSessionState.cs | 594 + 1 file changed, 301 insertions(+), 293 deletions(-) diff --git a/NetCore.Session/NetCoreSessionState.cs b/NetCore.Session/NetCoreSessionState.cs index 19f03e9..cdd0260 100644 --- a/NetCore.Session/NetCoreSessionState.cs +++ b/NetCore.Session/NetCoreSessionState.cs @@ -7,338 +7,346 @@ using System.Threading.Tasks; namespace Apache.Geode.Session { - public class SessionStateValue - { -DateTime _lastAccessTimeUtc; -DateTime _expirationTimeUtc = DateTime.MinValue; -TimeSpan _spanUntilStale = TimeSpan.Zero; -private byte[] _value; - -public SessionStateValue() { } -public SessionStateValue(byte[] value) +public class SessionStateValue { - FromByteArray(value); -} +DateTime _lastAccessTimeUtc; +DateTime _expirationTimeUtc = DateTime.MinValue; +TimeSpan _spanUntilStale = TimeSpan.Zero; +private byte[] _value; -public byte[] Value -{ - get { return _value; } - set { _value = value; } -} -public DateTime LastAccessTimeUtc -{ - get { return _lastAccessTimeUtc; } - set { _lastAccessTimeUtc = value; } -} +public SessionStateValue() { } +public SessionStateValue(byte[] value) +{ +FromByteArray(value); +} -public DateTime ExpirationTimeUtc -{ - get { return _expirationTimeUtc; } - set { _expirationTimeUtc = value; } -} +public byte[] Value +{ +get { return _value; } +set { _value = value; } +} +public DateTime LastAccessTimeUtc +{ +get { return _lastAccessTimeUtc; } +set { _lastAccessTimeUtc = value; } +} -public TimeSpan SpanUntilStale -{ - get { return _spanUntilStale; } - set { _spanUntilStale = value; } -} +public DateTime ExpirationTimeUtc +{ +get { return _expirationTimeUtc; } +set { _expirationTimeUtc = value; } +} -public byte[] ToByteArray() -{ - int neededBytes = 3*sizeof(long) + _value.Length; - byte[] byteArray = new byte[neededBytes]; - int byteIndex = 0; +public TimeSpan SpanUntilStale +{ +get { return _spanUntilStale; } +set { _spanUntilStale = value; } +} - // Append LastAccessTimeUtc - Array.Copy(BitConverter.GetBytes(LastAccessTimeUtc.Ticks), 0, byteArray, byteIndex, sizeof(long)); - byteIndex += sizeof(long); +public byte[] ToByteArray() +{ +int neededBytes = 3 * sizeof(long) + _value.Length; +byte[] byteArray = new byte[neededBytes]; +int byteIndex = 0; - // Append ExpirationTimeUtc - Array.Copy(BitConverter.GetBytes(ExpirationTimeUtc.Ticks), 0, byteArray, byteIndex, sizeof(long)); - byteIndex += sizeof(long); +// Append LastAccessTimeUtc +Array.Copy(BitConverter.GetBytes(LastAccessTimeUtc.Ticks), 0, byteArray, byteIndex, sizeof(long)); +byteIndex += sizeof(long); - // Append SpanUntilStale - Array.Copy(BitConverter.GetBytes(SpanUntilStale.Ticks), 0, byteArray, byteIndex, sizeof(long)); - byteIndex += sizeof(long); +// Append ExpirationTimeUtc +Array.Copy(BitConverter.GetBytes(ExpirationTimeUtc.Ticks), 0, byteArray, byteIndex, sizeof(long)); +byteIndex += sizeof(long); - // Append the value - Array.Copy(_value, 0, byteArray, byteIndex, _value.Length); - return byteArray; -} +// Append SpanUntilStale +Array.Copy(BitConverter.GetBytes(SpanUntilStale.Ticks), 0, byteArray, byteIndex, sizeof(long)); +byteIndex += sizeof(long); -public void FromByteArray(byte[] data) -{ - int byteIndex = 0; +// Append the value +Array.Copy(_value, 0, byteArray, byteIndex, _value.Length); +return byteArray; +} - // Extract the LastAccessTimeUtc - LastAccessTimeUtc = DateTime.FromBinary(BitConverter.ToInt64(data, byteIndex)); - byteIndex += sizeof(long); +public void FromByteArray(byte[] data) +{ +int byteIndex = 0; - // Extract the ExpirationTimeUtc - ExpirationTimeUtc = DateTime.FromBinary(BitConverter.ToInt64(data, byteIndex)); - byteIndex += sizeof(long); +// Extract the LastAccessTimeUtc +LastAccessTimeUtc = DateTime.FromBinary(BitConverter.ToInt64(data, byteIndex
[geode-dotnet-core-client] branch develop updated (aefab27 -> abda656)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode-dotnet-core-client.git. from aefab27 Add startserver/stopserver scripts - Also fix username/password in RegionFactory tests new 5468ffa Derive SessionStateCache from GeodeNativeObject new 6f5668d Add x64 platform new edf9a34 Switch to using statements new abda656 Merge branch 'develop' of https://github.com/apache/geode-dotnet-core-client into develop The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: NetCore.Session/NetCore.Session.csproj | 1 + NetCore.Session/NetCoreSessionState.cs | 594 +++-- NetCore.Test/NetCore.Test.csproj | 2 + NetCore/NetCore.csproj | 1 + .../NetCore.Session.IntegrationTests.csproj| 2 + .../SessionStateIntegrationTests.cs| 364 +++-- Session.Tests/NetCore.Session.Tests.csproj | 2 + Session.Tests/SessionStateCacheTests.cs| 11 +- SessionSample/SessionSample.csproj | 2 +- geode-dotnet-core.sln | 20 +- 10 files changed, 522 insertions(+), 477 deletions(-)
[geode-native] branch develop updated: GEODE-9259: cleanup and reenable testThinClientRegionOps (#807)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 9c64c8b GEODE-9259: cleanup and reenable testThinClientRegionOps (#807) 9c64c8b is described below commit 9c64c8bd2b2bfdff73bf06c32706ff683f895284 Author: Michael Martell AuthorDate: Sat May 15 20:39:02 2021 -0700 GEODE-9259: cleanup and reenable testThinClientRegionOps (#807) * Reenable testThinClientRegionOps * Fix clang-tidy error * Remove no-ack region * Remove dead code. --- cppcache/integration-test/CMakeLists.txt | 1 - .../integration-test/testThinClientRemoveOps.cpp | 346 +++-- 2 files changed, 36 insertions(+), 311 deletions(-) diff --git a/cppcache/integration-test/CMakeLists.txt b/cppcache/integration-test/CMakeLists.txt index 84ad66e..729a785 100644 --- a/cppcache/integration-test/CMakeLists.txt +++ b/cppcache/integration-test/CMakeLists.txt @@ -206,7 +206,6 @@ set_tests_properties( testThinClientPoolAttrTest testThinClientPoolLocator testThinClientPoolRedundancy -testThinClientRemoveOps testThinClientSecurityAuthentication testThinClientSecurityAuthenticationMU testThinClientSecurityAuthorization diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp index 51af047..23b4825 100644 --- a/cppcache/integration-test/testThinClientRemoveOps.cpp +++ b/cppcache/integration-test/testThinClientRemoveOps.cpp @@ -367,12 +367,10 @@ const char *vals[] = {"Value-1", "Value-2", "Value-3", "Value-4", const char *nvals[] = {"New Value-1", "New Value-2", "New Value-3", "New Value-4"}; -const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck", - "exampleRegion"}; +const char *regionNames[] = {"DistRegionAck", "exampleRegion"}; const bool USE_ACK = true; const bool NO_ACK = false; -//#include "LocatorHelper.hpp" DUNIT_TASK_DEFINITION(SERVER1, CreateServer1) { @@ -399,7 +397,7 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_With_Locator) { -if (isLocalServer) CacheHelper::initServer(1, nullptr, locatorsG); +if (isLocalServer) CacheHelper::initServer(1, {}, locatorsG); LOG("SERVER1 with locator started"); } END_TASK_DEFINITION @@ -408,7 +406,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator) { initClient(true); createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_"); -createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_"); LOG("StepOne_Pooled complete."); } END_TASK_DEFINITION @@ -416,7 +413,7 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT1, StepSeven_Pooled_Locator) { initClient(true); -createPooledRegion(regionNames[2], USE_ACK, locatorsG, "__TESTPOOL1_"); +createPooledRegion(regionNames[1], USE_ACK, locatorsG, "__TESTPOOL1_"); LOG("StepSeven_Pooled_Locator complete."); } END_TASK_DEFINITION @@ -425,7 +422,6 @@ DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_Locator) { initClient(true); createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_"); -createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_"); LOG("StepTwo complete."); } END_TASK_DEFINITION @@ -433,7 +429,6 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT1, StepThree) { putEntry(regionNames[0], keys[0], vals[0]); -putEntry(regionNames[1], keys[2], vals[2]); LOG("StepThree complete."); } END_TASK_DEFINITION @@ -441,7 +436,6 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT1, StepFive) { auto reg0 = getHelper()->getRegion(regionNames[0]); -auto reg1 = getHelper()->getRegion(regionNames[1]); auto keyPtr = CacheableString::create(keys[0]); auto keyPtr1 = CacheableString::create(keys[2]); @@ -450,53 +444,34 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFive) ASSERT(reg0->remove(keys[4], vals[4]) == false, "Result of remove should be false, as this entry is not present in " "first region."); -ASSERT(reg1->remove(keys[4], vals[4]) == false, - "Result of remove should be false, as this entry is not present in " - "second region."); // Try removing non-existent key, but existing value from regions, result // should be false. ASSERT(reg0->remove(keys[4], vals[0]) == false, "Result of remove should be false, as this key is not present in " &qu
[geode-native] 04/04: Remove dead code.
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9259-fix-testThinClientRegionOps in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 2ccb6ab40dc27d9a65bf6a776a794b88e646a6b3 Author: Mike Martell AuthorDate: Fri May 14 10:51:28 2021 -0700 Remove dead code. --- cppcache/integration-test/testThinClientRemoveOps.cpp | 12 1 file changed, 12 deletions(-) diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp index 95fa889..23b4825 100644 --- a/cppcache/integration-test/testThinClientRemoveOps.cpp +++ b/cppcache/integration-test/testThinClientRemoveOps.cpp @@ -371,7 +371,6 @@ const char *regionNames[] = {"DistRegionAck", "exampleRegion"}; const bool USE_ACK = true; const bool NO_ACK = false; -//#include "LocatorHelper.hpp" DUNIT_TASK_DEFINITION(SERVER1, CreateServer1) { @@ -1158,7 +1157,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepTwelve) ASSERT(regPtr0->containsKey(keyObject1) == false, "containsKey should be false"); try { - // retVal = regPtr0->get(keyObject1); retVal = regPtr0->get(x); ASSERT(retVal == nullptr, "value should not be found"); FAIL("Expected IllegalArgumentException here for get"); @@ -1240,15 +1238,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepTwelve) "containsKey should be false"); regPtr0->localPut(keyObject4, valObject1); regPtr0->localDestroy(keyObject4); -/*try { - objVal1 = -std::dynamic_pointer_cast(regPtr0->get(keyObject4));;// -need to verify that if entry is deleted then some exception should be thrown - FAIL("Expected EntryExistException here for get"); -}catch (Exception) -{ - LOG (" Expected exception thrown by get"); -}*/ createRegion("ABC", USE_ACK, true, true); auto regPtr2 = getHelper()->getRegion("ABC"); @@ -1480,7 +1469,6 @@ void runRemoveOps1() { DUNIT_MAIN { runRemoveOps(); - runRemoveOps1(); } END_MAIN
[geode-native] branch GEODE-9259-fix-testThinClientRegionOps created (now 2ccb6ab)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a change to branch GEODE-9259-fix-testThinClientRegionOps in repository https://gitbox.apache.org/repos/asf/geode-native.git. at 2ccb6ab Remove dead code. This branch includes the following new commits: new d193c69 GEODE-9250: Reenable testThinClientRegionOps new e2a6ea9 GEODE-9259: Fix clang-tidy error new ba42f33 GEODE-9259: Remove no-ack region new 2ccb6ab Remove dead code. The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode-native] 03/04: GEODE-9259: Remove no-ack region
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9259-fix-testThinClientRegionOps in repository https://gitbox.apache.org/repos/asf/geode-native.git commit ba42f338529782acee1da22ce3f0479c5e7d9ac6 Author: Mike Martell AuthorDate: Wed May 12 10:14:33 2021 -0700 GEODE-9259: Remove no-ack region --- .../integration-test/testThinClientRemoveOps.cpp | 329 +++-- 1 file changed, 33 insertions(+), 296 deletions(-) diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp index 2945499..95fa889 100644 --- a/cppcache/integration-test/testThinClientRemoveOps.cpp +++ b/cppcache/integration-test/testThinClientRemoveOps.cpp @@ -367,8 +367,7 @@ const char *vals[] = {"Value-1", "Value-2", "Value-3", "Value-4", const char *nvals[] = {"New Value-1", "New Value-2", "New Value-3", "New Value-4"}; -const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck", - "exampleRegion"}; +const char *regionNames[] = {"DistRegionAck", "exampleRegion"}; const bool USE_ACK = true; const bool NO_ACK = false; @@ -408,7 +407,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator) { initClient(true); createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_"); -createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_"); LOG("StepOne_Pooled complete."); } END_TASK_DEFINITION @@ -416,7 +414,7 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT1, StepSeven_Pooled_Locator) { initClient(true); -createPooledRegion(regionNames[2], USE_ACK, locatorsG, "__TESTPOOL1_"); +createPooledRegion(regionNames[1], USE_ACK, locatorsG, "__TESTPOOL1_"); LOG("StepSeven_Pooled_Locator complete."); } END_TASK_DEFINITION @@ -425,7 +423,6 @@ DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_Locator) { initClient(true); createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_"); -createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_"); LOG("StepTwo complete."); } END_TASK_DEFINITION @@ -433,7 +430,6 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT1, StepThree) { putEntry(regionNames[0], keys[0], vals[0]); -putEntry(regionNames[1], keys[2], vals[2]); LOG("StepThree complete."); } END_TASK_DEFINITION @@ -441,7 +437,6 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(CLIENT1, StepFive) { auto reg0 = getHelper()->getRegion(regionNames[0]); -auto reg1 = getHelper()->getRegion(regionNames[1]); auto keyPtr = CacheableString::create(keys[0]); auto keyPtr1 = CacheableString::create(keys[2]); @@ -450,53 +445,34 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFive) ASSERT(reg0->remove(keys[4], vals[4]) == false, "Result of remove should be false, as this entry is not present in " "first region."); -ASSERT(reg1->remove(keys[4], vals[4]) == false, - "Result of remove should be false, as this entry is not present in " - "second region."); // Try removing non-existent key, but existing value from regions, result // should be false. ASSERT(reg0->remove(keys[4], vals[0]) == false, "Result of remove should be false, as this key is not present in " "first region."); -ASSERT(reg1->remove(keys[4], vals[0]) == false, - "Result of remove should be false, as this key is not present in " - "second region."); // Try removing existent key, but non-existing value from regions, result // should be false. ASSERT(reg0->remove(keys[0], vals[4]) == false, "Result of remove should be false, as this value is not present in " "first region."); -ASSERT(reg1->remove(keys[0], vals[4]) == false, - "Result of remove should be false, as this value is not present in " - "second region."); // Try removing existent key, and existing value from regions, result should // be true. ASSERT(reg0->remove(keys[0], vals[0]) == true, "Result of remove should be true, as this entry is present in first " "region."); -ASSERT( -reg1->remove(keys[2], vals[2]) == true, -"Result of remove should be true, as this entry is present in second " -"region."); ASSERT(reg0->containsKey(keys[0]) == false, "containsKey should be false"); ASSERT(reg0->containsKeyOnServer(keyPt
[geode-native] 02/04: GEODE-9259: Fix clang-tidy error
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9259-fix-testThinClientRegionOps in repository https://gitbox.apache.org/repos/asf/geode-native.git commit e2a6ea984ab6e217ff0972df8f5357a6805afeae Author: Mike Martell AuthorDate: Tue May 11 11:55:36 2021 -0700 GEODE-9259: Fix clang-tidy error --- cppcache/integration-test/testThinClientRemoveOps.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp index 51af047..2945499 100644 --- a/cppcache/integration-test/testThinClientRemoveOps.cpp +++ b/cppcache/integration-test/testThinClientRemoveOps.cpp @@ -399,7 +399,7 @@ END_TASK_DEFINITION DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_With_Locator) { -if (isLocalServer) CacheHelper::initServer(1, nullptr, locatorsG); +if (isLocalServer) CacheHelper::initServer(1, {}, locatorsG); LOG("SERVER1 with locator started"); } END_TASK_DEFINITION @@ -625,7 +625,8 @@ DUNIT_TASK_DEFINITION(CLIENT2, StepSix) reg1->destroy(keys[3]); putEntry(regionNames[0], keys[1], vals[1]); putEntry(regionNames[1], keys[3], vals[3]); -reg0->localInvalidate(keys[1]); +reg0->localInvalidate( +keys[1]); // Invalidating a key sets its value to null reg1->localInvalidate(keys[3]); ASSERT(reg0->remove(keys[1], static_cast>( nullptr)) == false,
[geode-native] 01/04: GEODE-9250: Reenable testThinClientRegionOps
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch GEODE-9259-fix-testThinClientRegionOps in repository https://gitbox.apache.org/repos/asf/geode-native.git commit d193c6918d9596be84c72d08fe73e42416cf823d Author: Mike Martell AuthorDate: Tue May 11 11:54:52 2021 -0700 GEODE-9250: Reenable testThinClientRegionOps --- cppcache/integration-test/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/cppcache/integration-test/CMakeLists.txt b/cppcache/integration-test/CMakeLists.txt index 84ad66e..729a785 100644 --- a/cppcache/integration-test/CMakeLists.txt +++ b/cppcache/integration-test/CMakeLists.txt @@ -206,7 +206,6 @@ set_tests_properties( testThinClientPoolAttrTest testThinClientPoolLocator testThinClientPoolRedundancy -testThinClientRemoveOps testThinClientSecurityAuthentication testThinClientSecurityAuthenticationMU testThinClientSecurityAuthorization
[geode-native] branch develop updated: GEODE-9249: remove(key, value) bug
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 86c0046 GEODE-9249: remove(key, value) bug 86c0046 is described below commit 86c00466257120e1cf3eb042ede866a3828e7626 Author: Michael Martell AuthorDate: Fri May 14 10:03:04 2021 -0700 GEODE-9249: remove(key, value) bug * Added a new CACHING_PROXY test suite * Fix the bug in TcrMessageDestroy * Add isUserNullValue to TcrMessageDestroy CTOR, to allow both types of Destroy messages * Add support for creating a Cacheable from a nullptr --- cppcache/include/geode/CacheableBuiltins.hpp | 5 + cppcache/integration/test/CMakeLists.txt | 1 + cppcache/integration/test/CachingProxyTest.cpp | 174 + cppcache/src/TcrMessage.cpp| 4 +- cppcache/src/TcrMessage.hpp| 1 + cppcache/src/ThinClientRegion.cpp | 8 +- cppcache/test/TcrMessageTest.cpp | 8 +- 7 files changed, 191 insertions(+), 10 deletions(-) diff --git a/cppcache/include/geode/CacheableBuiltins.hpp b/cppcache/include/geode/CacheableBuiltins.hpp index ec81932..206fdd4 100644 --- a/cppcache/include/geode/CacheableBuiltins.hpp +++ b/cppcache/include/geode/CacheableBuiltins.hpp @@ -55,6 +55,11 @@ inline std::shared_ptr Serializable::create(bool value) { return CacheableBoolean::create(value); } +template <> +inline std::shared_ptr Serializable::create(std::nullptr_t) { + return static_cast>(nullptr); +} + /** * An immutable wrapper for byte that can serve as * a distributable key object for caching. diff --git a/cppcache/integration/test/CMakeLists.txt b/cppcache/integration/test/CMakeLists.txt index d3363e5..62f0391 100644 --- a/cppcache/integration/test/CMakeLists.txt +++ b/cppcache/integration/test/CMakeLists.txt @@ -17,6 +17,7 @@ add_executable(cpp-integration-test AuthInitializeTest.cpp BasicIPv6Test.cpp CacheWriterTest.cpp + CachingProxyTest.cpp CacheXmlTest.cpp CleanIdleConnections.cpp ClientTransactionXATest.cpp diff --git a/cppcache/integration/test/CachingProxyTest.cpp b/cppcache/integration/test/CachingProxyTest.cpp new file mode 100644 index 000..f6f0d83 --- /dev/null +++ b/cppcache/integration/test/CachingProxyTest.cpp @@ -0,0 +1,174 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include "framework/Cluster.h" + +using apache::geode::client::Cache; +using apache::geode::client::Cacheable; +using apache::geode::client::CacheableString; +using apache::geode::client::CacheFactory; +using apache::geode::client::Region; +using apache::geode::client::RegionShortcut; +using apache::geode::client::Serializable; + +TEST(CachingProxyTest, LocalRemoveAfterLocalInvalidate) { + Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}}; + cluster.start(); + cluster.getGfsh() + .create() + .region() + .withName("region") + .withType("PARTITION") + .execute(); + + auto cache = CacheFactory().create(); + + cache.getPoolManager() + .createFactory() + .addLocator("localhost", cluster.getLocatorPort()) + .create("pool"); + + std::string key = std::string("scharles"); + std::string value = std::string("Sylvia Charles"); + + auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY) +.setPoolName("pool") +.create("region"); + + region->put(key, value); + + auto user = region->get(key); + + region->localInvalidate(key); + + auto resultLocalRemove = region->localRemove(key, value); + ASSERT_FALSE(resultLocalRemove); + + resultLocalRemove = region->localRemove(key, nullptr); + ASSERT_TRUE(resultLocalRemove); +} + +TEST(CachingProxyTest, RemoveAfterInvalidate) { + Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}}; + cluster.st
[geode-native] branch develop updated: GEODE-8925: port singleHop tests to new framework (#760)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 7e3a013 GEODE-8925: port singleHop tests to new framework (#760) 7e3a013 is described below commit 7e3a01343d13758a957357cc593d7dbf0d131773 Author: Michael Martell AuthorDate: Sat Mar 27 06:47:35 2021 -0700 GEODE-8925: port singleHop tests to new framework (#760) * Fix logging error in TcrMessage (metadata size not printing) * Enhance singleHop support in PartitionRegionOpsTest - support for getAll and putAll - reduce redundant operations by combining puts/get in each test * GEODE-8925: Refactor per review feedback * Remove reliance on logfile. * Remove the old singleHop tests --- cppcache/integration-test/CMakeLists.txt |2 - .../integration-test/testThinClientPRSingleHop.cpp | 1180 .../testThinClientPutAllPRSingleHop.cpp| 421 --- .../integration/test/PartitionRegionOpsTest.cpp| 225 ++-- cppcache/src/TcrMessage.cpp|2 +- 5 files changed, 122 insertions(+), 1708 deletions(-) diff --git a/cppcache/integration-test/CMakeLists.txt b/cppcache/integration-test/CMakeLists.txt index efc7f43..7e3be0c 100644 --- a/cppcache/integration-test/CMakeLists.txt +++ b/cppcache/integration-test/CMakeLists.txt @@ -215,7 +215,6 @@ set_tests_properties( testThinClientPoolRedundancy testThinClientPoolServer testThinClientPutAll -testThinClientPutAllPRSingleHop testThinClientPutAllWithCallBackArgWithoutConcurrency testThinClientSecurityCQAuthorizationMU testThinClientTXFailover @@ -226,7 +225,6 @@ set_tests_properties( testThinClientCqDurable testThinClientGatewayTest testThinClientHAFailoverRegex -testThinClientPRSingleHop testThinClientPoolAttrTest testThinClientPoolLocator testThinClientRemoteQueryTimeout diff --git a/cppcache/integration-test/testThinClientPRSingleHop.cpp b/cppcache/integration-test/testThinClientPRSingleHop.cpp deleted file mode 100644 index ed8d4a1..000 --- a/cppcache/integration-test/testThinClientPRSingleHop.cpp +++ /dev/null @@ -1,1180 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define ROOT_NAME "testThinClientPRSingleHop" -#define ROOT_SCOPE DISTRIBUTED_ACK - -#include -#include -#include - -#include -#include -#include - -#include - -#include "fw_dunit.hpp" -#include "BuiltinCacheableWrappers.hpp" -#include "Utils.hpp" - -#include "CacheHelper.hpp" - -// Include these 2 headers for access to CacheImpl for test hooks. -#include "CacheImplHelper.hpp" -#include "testUtils.hpp" - -#include "ThinClientHelper.hpp" - -#define CLIENT1 s1p1 -#define SERVER1 s2p1 -#define SERVER2 s1p2 -#define SERVER3 s2p2 - -using apache::geode::client::CacheServerException; -using apache::geode::client::CacheWriterException; -using apache::geode::client::Exception; -using apache::geode::client::internal::DSCode; - -using apache::geode::client::testing::CacheableWrapper; -using apache::geode::client::testing::CacheableWrapperFactory; - -bool isLocalServer = false; -const std::string endPoints = CacheHelper::getTcrEndpoints(isLocalServer, 3); - -static bool isLocator = false; -const std::string locatorsG = -CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1); - -template -T randomValue(T maxValue) { - static thread_local std::default_random_engine generator( - std::random_device{}()); - return std::uniform_int_distribution{0, maxValue}(generator); -} - -class putThread : public ACE_Task_Base { - private: - std::shared_ptr regPtr; - int m_min; - int m_max; - bool m_isWarmUpTask; - int m_failureCount; - - public: - putThread(const char *name, int min, int max, bool isWarmUpTask) - : regPtr(getHelper()->getRegion(name)), -m_min(min), -m_max(max), -m_isWarmUpTask(isWarmUpTask), -m_failureCount(0) {} - - int getFailureCount(
[geode-native] branch master updated: GEODE-8949: Enable/disable github Merge button
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/master by this push: new e3fd036 GEODE-8949: Enable/disable github Merge button e3fd036 is described below commit e3fd0361f550624e368b480726e18844d28368a6 Author: Mike Martell AuthorDate: Fri Mar 5 14:32:17 2021 -0800 GEODE-8949: Enable/disable github Merge button --- .asf.yaml | 51 +++ 1 file changed, 51 insertions(+) diff --git a/.asf.yaml b/.asf.yaml index 003d459..5bcd60f 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -7,6 +7,57 @@ # See the License for the specific language governing permissions and # limitations under the License. +github: + description: "Apache Geode Native" + homepage: https://geode.apache.org/ + labels: +- geode +- datagrid +- apache + features: +# To enable wiki for documentation +wiki: false +# To enable issue management +issues: false +# To enable projects for project management boards +projects: true + + enabled_merge_buttons: +# enable squash button: +squash: true +# enable merge button: +merge: true +# enable rebase button: +rebase: true + + protected_branches: +develop: + required_status_checks: +# strict means "Require branches to be up to date before merging". +strict: false +# contexts are the names of checks that must pass +contexts: +- concourse-ci/build-rhel-7-debug +- concourse-ci/build-rhel-8-debug +- concourse-ci/build-ubuntu-16.04-debug +- concourse-ci/build-ubuntu-18.04-debug +- concourse-ci/build-ubuntu-20.04-debug +- concourse-ci/build-windows-2016-vs-2017-debug +# - concourse-ci/build-windows-2019-vs-2019-debug +- concourse-ci/clang-format +- concourse-ci/clang-tidy +- concourse-ci/rat-check +- LGTM analysis: C# +- LGTM analysis: JavaScript +- LGTM analysis: C/C++ + + required_pull_request_reviews: +dismiss_stale_reviews: false +require_code_owner_reviews: false +required_approving_review_count: 1 + + required_signatures: false + notifications: commits: commits@geode.apache.org issues: iss...@geode.apache.org
[geode-native] branch develop updated: GEODE-8949: Disable Merge until CI green
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 540e858 GEODE-8949: Disable Merge until CI green 540e858 is described below commit 540e858f0cfbd2803d1c8b0f2dbccb5ee494699d Author: Mike Martell AuthorDate: Fri Mar 5 13:47:55 2021 -0800 GEODE-8949: Disable Merge until CI green --- ci/.asf.yaml | 65 1 file changed, 65 insertions(+) diff --git a/ci/.asf.yaml b/ci/.asf.yaml new file mode 100644 index 000..5bcd60f --- /dev/null +++ b/ci/.asf.yaml @@ -0,0 +1,65 @@ +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +github: + description: "Apache Geode Native" + homepage: https://geode.apache.org/ + labels: +- geode +- datagrid +- apache + features: +# To enable wiki for documentation +wiki: false +# To enable issue management +issues: false +# To enable projects for project management boards +projects: true + + enabled_merge_buttons: +# enable squash button: +squash: true +# enable merge button: +merge: true +# enable rebase button: +rebase: true + + protected_branches: +develop: + required_status_checks: +# strict means "Require branches to be up to date before merging". +strict: false +# contexts are the names of checks that must pass +contexts: +- concourse-ci/build-rhel-7-debug +- concourse-ci/build-rhel-8-debug +- concourse-ci/build-ubuntu-16.04-debug +- concourse-ci/build-ubuntu-18.04-debug +- concourse-ci/build-ubuntu-20.04-debug +- concourse-ci/build-windows-2016-vs-2017-debug +# - concourse-ci/build-windows-2019-vs-2019-debug +- concourse-ci/clang-format +- concourse-ci/clang-tidy +- concourse-ci/rat-check +- LGTM analysis: C# +- LGTM analysis: JavaScript +- LGTM analysis: C/C++ + + required_pull_request_reviews: +dismiss_stale_reviews: false +require_code_owner_reviews: false +required_approving_review_count: 1 + + required_signatures: false + +notifications: +commits: commits@geode.apache.org +issues: iss...@geode.apache.org +pullrequests: notificati...@geode.apache.org +jira_options: link label comment
[geode-native] branch develop updated: Make check-source and update-pipeline jobs public
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 3044031 Make check-source and update-pipeline jobs public 3044031 is described below commit 3044031edaad232342f95d94de41fbfe1411b607 Author: Mike Martell AuthorDate: Fri Feb 26 08:44:30 2021 -0800 Make check-source and update-pipeline jobs public --- ci/lib/templates.lib.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/lib/templates.lib.yml b/ci/lib/templates.lib.yml index 8ffa045..308d571 100644 --- a/ci/lib/templates.lib.yml +++ b/ci/lib/templates.lib.yml @@ -236,6 +236,7 @@ plan: --- #@ def update_pipeline_job(): name: #@ update_pipeline_job_name() +public: true serial: true plan: - in_parallel: @@ -394,6 +395,7 @@ in_parallel: --- #@ def check_source_job(): name: #@ check_source_job_name() +public: true plan: - in_parallel: fail_fast: true
[geode-native] branch develop updated: Make jobs detail public
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 6471024 Make jobs detail public 6471024 is described below commit 6471024a04e919061c05c7594cf11f5491eded77 Author: Mike Martell AuthorDate: Fri Feb 26 08:30:44 2021 -0800 Make jobs detail public --- ci/lib/templates.lib.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/lib/templates.lib.yml b/ci/lib/templates.lib.yml index 9e4e1cb..8ffa045 100644 --- a/ci/lib/templates.lib.yml +++ b/ci/lib/templates.lib.yml @@ -171,6 +171,7 @@ source: --- #@ def build_job(build, config): name: #@ build_job_name(build, config) +public: true plan: - in_parallel: fail_fast: true
[geode-native] branch develop updated: Remove obsolete Travis related files (#752)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new ef73849 Remove obsolete Travis related files (#752) ef73849 is described below commit ef73849cf5b48967ebcc1b4a11fab3bac6c04945 Author: Michael Martell AuthorDate: Wed Feb 24 06:52:00 2021 -0800 Remove obsolete Travis related files (#752) --- .travis.yml | 52 docker/Dockerfile | 72 --- 2 files changed, 124 deletions(-) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 60739c1..000 --- a/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# cpp tools are outdated, so use docker -language: generic - -# required for docker -sudo: required - -services: - - docker - -env: - global: -- DOCKER_ARGS="--rm --volume=${TRAVIS_BUILD_DIR}:/geode-native" -- DOCKER_IMAGE="apachegeode/geode-native-build:latest" -- SOURCE_DIR="/geode-native" - - matrix: -- DOCKER_COMMAND="echo rat && mkdir build && cd build && cmake ${SOURCE_DIR} -DUSE_RAT=ON && cmake --build . --target rat-check" -- DOCKER_COMMAND="echo test && mkdir build && cd build && cmake ${SOURCE_DIR} -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_CXX_CLANG_TIDY=clang-tidy && cmake --build . -- -j2 && ./cppcache/test/apache-geode_unittests && git -C ${SOURCE_DIR} diff --exit-code" - -install: - - docker pull "${DOCKER_IMAGE}" - -script: - - sudo apt-get update && sudo apt-get install -y libseccomp2 - - docker run ${DOCKER_ARGS} "${DOCKER_IMAGE}" bash -c "${DOCKER_COMMAND}" - -notifications: - email: -recipients: - - d...@geode.apache.org -on_success: change -on_failure: change - -branches: - except: -- /^feature.*$/ -- asf-site diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 3f755b4..000 --- a/docker/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM ubuntu -LABEL maintainer="Apache Geode " - -ENV TZ=US/Pacific -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -ARG CLANG_VERSION=11 -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ -apt-get install -y \ -libc++-dev \ -libc++abi-dev \ -libssl-dev \ -zlib1g-dev \ -clang-${CLANG_VERSION} \ -clang-tidy-${CLANG_VERSION} \ -clang-format-${CLANG_VERSION} \ -make \ -doxygen \ -git \ -graphviz \ -openjdk-8-jdk \ -curl && \ -rm -rf /var/lib/apt/lists/* && \ -ln -s /usr/lib/llvm-*/include/c++/v1/ /usr/include/c++/v1 && \ -update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 999 && \ -update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 999 && \ -update-alternatives --install /usr/bin/cc
[geode-native] branch develop updated: GEODE-8949 rollback travis config since docker image updated to lates… (#749)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 679274d GEODE-8949 rollback travis config since docker image updated to lates… (#749) 679274d is described below commit 679274d378976d200d7c5b02ac0b83188ebd1481 Author: Michael Martell AuthorDate: Mon Feb 22 20:33:49 2021 -0800 GEODE-8949 rollback travis config since docker image updated to lates… (#749) * GEODE-8949 rollback travis config since docker image updated to latest cmake * Fix clang-format error --- .travis.yml| 7 ++- tests/cpp/fwklib/FwkBB.hpp | 22 +++--- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b2efed..60739c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,13 +27,10 @@ env: - DOCKER_ARGS="--rm --volume=${TRAVIS_BUILD_DIR}:/geode-native" - DOCKER_IMAGE="apachegeode/geode-native-build:latest" - SOURCE_DIR="/geode-native" -- CMAKE_VERSION=3.18 -- PATH=/tmp/cmake-${CMAKE_VERSION}.0-Linux-x86_64/bin:$PATH - matrix: -- DOCKER_COMMAND="pushd /tmp && wget -O cmake.tgz https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.0-Linux-x86_64.tar.gz && tar xzf cmake.tgz && popd && echo rat && mkdir build && cd build && /tmp/cmake-3.18.0-Linux-x86_64/bin/cmake ${SOURCE_DIR} -DUSE_RAT=ON && /tmp/cmake-3.18.0-Linux-x86_64/bin/cmake --build . --target rat-check" -- DOCKER_COMMAND="pushd /tmp && wget -O cmake.tgz https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.0-Linux-x86_64.tar.gz && tar xzf cmake.tgz && popd && echo test && mkdir build && cd build && /tmp/cmake-3.18.0-Linux-x86_64/bin/cmake ${SOURCE_DIR} -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_CXX_CLANG_TIDY=clang-tidy && /tmp/cmake-3.18.0-Linux-x86_64/bin/cmake --build . -- -j2 && ./cppcache/test/apache-geode_unittests && git -C ${SOURCE_DIR} diff --exit-code" +- DOCKER_COMMAND="echo rat && mkdir build && cd build && cmake ${SOURCE_DIR} -DUSE_RAT=ON && cmake --build . --target rat-check" +- DOCKER_COMMAND="echo test && mkdir build && cd build && cmake ${SOURCE_DIR} -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_CXX_CLANG_TIDY=clang-tidy && cmake --build . -- -j2 && ./cppcache/test/apache-geode_unittests && git -C ${SOURCE_DIR} diff --exit-code" install: - docker pull "${DOCKER_IMAGE}" diff --git a/tests/cpp/fwklib/FwkBB.hpp b/tests/cpp/fwklib/FwkBB.hpp index 12c1ccf..b13eba3 100644 --- a/tests/cpp/fwklib/FwkBB.hpp +++ b/tests/cpp/fwklib/FwkBB.hpp @@ -50,18 +50,18 @@ namespace testframework { #define BB_RESULT_TAG "" //#define BB_END_TAG"" -#define BB_CLEAR_COMMAND "C" //"clear" -#define BB_DUMP_COMMAND "d" //"dump" -#define BB_GET_COMMAND "g" //"get" -#define BB_SET_COMMAND "s" //"set" -#define BB_ADD_COMMAND "A" //"add" -#define BB_SUBTRACT_COMMAND "S" //"subtract" -#define BB_INCREMENT_COMMAND "I" //"increment" -#define BB_DECREMENT_COMMAND "D" //"decrement" -#define BB_ZERO_COMMAND "z" //"zero" +#define BB_CLEAR_COMMAND "C" //"clear" +#define BB_DUMP_COMMAND "d"//"dump" +#define BB_GET_COMMAND "g" //"get" +#define BB_SET_COMMAND "s" //"set" +#define BB_ADD_COMMAND "A" //"add" +#define BB_SUBTRACT_COMMAND "S"//"subtract" +#define BB_INCREMENT_COMMAND "I" //"increment" +#define BB_DECREMENT_COMMAND "D" //"decrement" +#define BB_ZERO_COMMAND "z"//"zero" #define BB_SET_IF_GREATER_COMMAND "G" //"setIfGreater" -#define BB_SET_IF_LESS_COMMAND "L" //"setIfLess" -#define BB_SET_ACK_COMMAND "a" //"ack" +#define BB_SET_IF_LESS_COMMAND "L" //"setIfLess" +#define BB_SET_ACK_COMMAND "a" //"ack" //
[geode-native] branch develop updated: GEODE-8949: Fix broken build inconsistent-missing-override (#747)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 8f8d80a GEODE-8949: Fix broken build inconsistent-missing-override (#747) 8f8d80a is described below commit 8f8d80a56e180e6a7d69d5277dae5c204afe192b Author: M. Oleske AuthorDate: Fri Feb 19 13:53:55 2021 -0800 GEODE-8949: Fix broken build inconsistent-missing-override (#747) GEODE-8949: Fix broken build inconsistent-missing-override * Was failing to build on Mac * Update to actually use scrubTestLogFiles Authored-by: M. Oleske --- cppcache/test/LoggingTest.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cppcache/test/LoggingTest.cpp b/cppcache/test/LoggingTest.cpp index d486b19..1a8130c 100644 --- a/cppcache/test/LoggingTest.cpp +++ b/cppcache/test/LoggingTest.cpp @@ -94,9 +94,7 @@ class LoggingTest : public testing::Test { } } - virtual void SetUp() { -// scrubTestLogFiles(); - } + void SetUp() override { scrubTestLogFiles(); } void TearDown() override { scrubTestLogFiles(); }
[geode-native] branch develop updated: GEODE-8562: Use standard .NET types in .NET ClassAsKey Example (#742)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 453324b GEODE-8562: Use standard .NET types in .NET ClassAsKey Example (#742) 453324b is described below commit 453324b7460c575424b8cb96878b1e4118ff7bd4 Author: Michael Martell AuthorDate: Mon Feb 8 13:55:08 2021 -0800 GEODE-8562: Use standard .NET types in .NET ClassAsKey Example (#742) * Use standard .NET types (e.g. String instead of CacheableString) * Use new Objects.Hash() API so client and server match * Remove public from CacheableString since no longer needed * Print matching hashCode output and add to README.md --- clicache/src/CacheableString.hpp| 2 +- examples/dotnet/classaskey/PhotosKey.cs | 39 +++- examples/dotnet/classaskey/Program.cs | 42 +++-- examples/dotnet/classaskey/README.md| 80 + examples/utilities/PhotosKey.java | 15 ++- 5 files changed, 87 insertions(+), 91 deletions(-) diff --git a/clicache/src/CacheableString.hpp b/clicache/src/CacheableString.hpp index b4f1c37..c15d7f3 100644 --- a/clicache/src/CacheableString.hpp +++ b/clicache/src/CacheableString.hpp @@ -40,7 +40,7 @@ namespace Apache /// An immutable string wrapper that can serve as a distributable /// key object for caching as well as being a string value. /// - public ref class CacheableString + ref class CacheableString : public IDataSerializablePrimitive, public CacheableKey { public: diff --git a/examples/dotnet/classaskey/PhotosKey.cs b/examples/dotnet/classaskey/PhotosKey.cs index eb8bb9a..f94c4ef 100644 --- a/examples/dotnet/classaskey/PhotosKey.cs +++ b/examples/dotnet/classaskey/PhotosKey.cs @@ -22,18 +22,22 @@ namespace Apache.Geode.Examples.ClassAsKey { public class PhotosKey : IDataSerializable, ICacheableKey { -public List people; -public CacheableDate rangeStart; -public CacheableDate rangeEnd; +public List people; +public DateTime rangeStart; +public DateTime rangeEnd; // A default constructor is required for deserialization public PhotosKey() { } -public PhotosKey(List names, CacheableDate start, CacheableDate end) +public PhotosKey(List names, DateTime start, DateTime end) { people = names; - rangeStart = start; - rangeEnd = end; + + // Geode server defaults to Utc to ensure hashes match between client and + // server + TimeZone tz = TimeZone.CurrentTimeZone; + rangeStart = tz.ToUniversalTime(start); + rangeEnd = tz.ToUniversalTime(end); } public override string ToString() @@ -53,15 +57,15 @@ namespace Apache.Geode.Examples.ClassAsKey public void ToData(DataOutput output) { output.WriteObject(people); - output.WriteObject(rangeStart); - output.WriteObject(rangeEnd); + output.WriteDate(rangeStart); + output.WriteDate(rangeEnd); } public void FromData(DataInput input) { - people = (List)input.ReadObject(); - rangeStart = (CacheableDate)input.ReadObject(); - rangeEnd = (CacheableDate)input.ReadObject(); + people = (List)input.ReadObject(); + rangeStart = (DateTime)input.ReadDate(); + rangeEnd = (DateTime)input.ReadDate(); } public ulong ObjectSize @@ -94,17 +98,7 @@ namespace Apache.Geode.Examples.ClassAsKey public override int GetHashCode() { - int prime = 31; - int result = 1; - foreach (CacheableString cs in people) - { -result = result * prime + cs.GetHashCode(); - } - - result = result * prime + rangeStart.GetHashCode(); - result = result * prime + rangeEnd.GetHashCode(); - - return result; + return Objects.Hash(people, rangeStart, rangeEnd); } public static ISerializable CreateDeserializable() @@ -114,4 +108,3 @@ namespace Apache.Geode.Examples.ClassAsKey } } - diff --git a/examples/dotnet/classaskey/Program.cs b/examples/dotnet/classaskey/Program.cs index e51093d..0352440 100644 --- a/examples/dotnet/classaskey/Program.cs +++ b/examples/dotnet/classaskey/Program.cs @@ -39,8 +39,8 @@ namespace Apache.Geode.Examples.ClassAsKey PhotosKey[] keys = new PhotosKey[MAXPHOTOKEYS]; PhotosValue[] values = new PhotosValue[MAXPHOTOKEYS]; - CacheableDate start; - CacheableDate end; + DateTime start; + DateTime end; rand = new Random(); int numPhotos; @@ -62,7 +62,8 @@ namespace Apache.Geode.Examples.ClassAsKey } values[i] = new PhotosValue(metaData); -Console.WriteLine("Inserting " + numPhotos + " photos for key: " + keys[i].ToString()); +Console.WriteLine("Inserting " + numPhotos +
[geode-native] branch develop updated: GEODE-8562: Add new C# classaskey Example (#725)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new e9076f5 GEODE-8562: Add new C# classaskey Example (#725) e9076f5 is described below commit e9076f5cfeaedc6fa7951a33bf4ea32f09f7fafc Author: Michael Martell AuthorDate: Tue Jan 19 16:28:46 2021 -0800 GEODE-8562: Add new C# classaskey Example (#725) * Add System.Drawing for classaskey example * Use DateTime in the key and add stopserver * Use smaller dataset to minimize output * Switch to CacheableDate for consistency Co-authored-by: Dave Barnes --- clicache/src/CacheableString.hpp | 2 +- examples/dotnet/CMakeLists.txt | 3 + examples/dotnet/CMakeLists.txt.dotnet_example.in | 2 +- examples/dotnet/CMakeLists.txt.in | 1 + .../CMakeLists.txt}| 10 +- examples/dotnet/classaskey/PhotosKey.cs| 117 examples/dotnet/classaskey/PhotosValue.cs | 121 examples/dotnet/classaskey/Program.cs | 212 + examples/dotnet/classaskey/README.md | 95 + examples/dotnet/classaskey/startserver.ps1 | 45 + .../stopserver.ps1}| 37 ++-- .../utilities/InstantiateDataSerializable.java | 52 + examples/utilities/PhotosKey.java | 93 + 13 files changed, 769 insertions(+), 21 deletions(-) diff --git a/clicache/src/CacheableString.hpp b/clicache/src/CacheableString.hpp index c15d7f3..b4f1c37 100644 --- a/clicache/src/CacheableString.hpp +++ b/clicache/src/CacheableString.hpp @@ -40,7 +40,7 @@ namespace Apache /// An immutable string wrapper that can serve as a distributable /// key object for caching as well as being a string value. /// - ref class CacheableString + public ref class CacheableString : public IDataSerializablePrimitive, public CacheableKey { public: diff --git a/examples/dotnet/CMakeLists.txt b/examples/dotnet/CMakeLists.txt index fba2374..11ef580 100644 --- a/examples/dotnet/CMakeLists.txt +++ b/examples/dotnet/CMakeLists.txt @@ -49,6 +49,9 @@ endfunction() add_example(NAME authinitialize SOURCE ExampleAuthInitialize.cs Program.cs) +add_example(NAME classaskey + SOURCE PhotosKey.cs PhotosValue.cs Program.cs) + add_example(NAME continuousquery SOURCE Order.cs MyCqListener.cs Program.cs) diff --git a/examples/dotnet/CMakeLists.txt.dotnet_example.in b/examples/dotnet/CMakeLists.txt.dotnet_example.in index 978a013..f845522 100644 --- a/examples/dotnet/CMakeLists.txt.dotnet_example.in +++ b/examples/dotnet/CMakeLists.txt.dotnet_example.in @@ -31,4 +31,4 @@ target_link_libraries(${PROJECT_NAME} set_target_properties(${PROJECT_NAME} PROPERTIES VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.5.2" -VS_DOTNET_REFERENCES "System;${@PRODUCT_NAME_NOSPACE@_DOTNET_LIBRARY}") +VS_DOTNET_REFERENCES "System;System.Drawing;${@PRODUCT_NAME_NOSPACE@_DOTNET_LIBRARY}") diff --git a/examples/dotnet/CMakeLists.txt.in b/examples/dotnet/CMakeLists.txt.in index 19935c2..69ec90d 100644 --- a/examples/dotnet/CMakeLists.txt.in +++ b/examples/dotnet/CMakeLists.txt.in @@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 3.10) project(@PRODUCT_DLL_NAME@.DotNet.Examples LANGUAGES NONE) add_subdirectory(authinitialize) +add_subdirectory(classaskey) add_subdirectory(continuousquery) add_subdirectory(dataserializable) add_subdirectory(functionexecution) diff --git a/examples/dotnet/CMakeLists.txt.dotnet_example.in b/examples/dotnet/classaskey/CMakeLists.txt similarity index 80% copy from examples/dotnet/CMakeLists.txt.dotnet_example.in copy to examples/dotnet/classaskey/CMakeLists.txt index 978a013..87365ed 100644 --- a/examples/dotnet/CMakeLists.txt.dotnet_example.in +++ b/examples/dotnet/classaskey/CMakeLists.txt @@ -15,20 +15,20 @@ cmake_minimum_required(VERSION 3.10) -project(dotnet-@ADD_EXAMPLE_NAME@ LANGUAGES CSharp) +project(dotnet-classaskey LANGUAGES CSharp) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake) -find_package(@PRODUCT_NAME_NOSPACE@ REQUIRED COMPONENTS dotnet) +find_package(GeodeNative REQUIRED COMPONENTS dotnet) -add_executable(${PROJECT_NAME} @ADD_EXAMPLE_SOURCE@) +add_executable(${PROJECT_NAME} PhotosKey.cs;PhotosValue.cs;Program.cs) configure_file("startserver.ps1" ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file("stopserver.ps1" ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) target_link_libraries(${PROJECT_NAME} -@PRODUCT_NAME_NOSPACE@::dotnet) +GeodeNative::dotnet) set_target_properties(${PROJECT_NAME} PROPERTIES VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.5.2&quo
[geode-native] branch develop updated: GEODE-8562: Adds new C++ test for using a class as a key (#714)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 5c65fc7 GEODE-8562: Adds new C++ test for using a class as a key (#714) 5c65fc7 is described below commit 5c65fc772347a38e739edfaa34f7e45454fae505 Author: Michael Martell AuthorDate: Tue Dec 22 07:01:11 2020 -0800 GEODE-8562: Adds new C++ test for using a class as a key (#714) * Add new ClassAsKey test * Use new classId for PositionKey (resolves conflict with existing classId) * Make hashcode matche Java side hashcode * Convert to C++11 style constructors (use explicit and default) * Remove unneccessary headers * Add explicit to constructor. * Don't use c-style casts * Improved variable names Co-authored-by: Jacob Barrett --- clicache/integration-test2/SerializationTests.cs | 4 +- cppcache/integration/test/CMakeLists.txt | 4 + cppcache/integration/test/DataSerializableTest.cpp | 67 - cppcache/integration/test/Position.cpp | 85 ++ cppcache/integration/test/Position.hpp | 78 cppcache/integration/test/PositionKey.cpp | 43 +++ cppcache/integration/test/PositionKey.hpp | 58 +++ .../cli/InstantiateDataSerializable.java | 9 ++- tests/javaobject/cli/PositionKey.java | 2 +- 9 files changed, 341 insertions(+), 9 deletions(-) diff --git a/clicache/integration-test2/SerializationTests.cs b/clicache/integration-test2/SerializationTests.cs index bce822d..cf066f8 100644 --- a/clicache/integration-test2/SerializationTests.cs +++ b/clicache/integration-test2/SerializationTests.cs @@ -835,7 +835,7 @@ namespace Apache.Geode.Client.IntegrationTests var cache = cluster.CreateCache(); - cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 77); + cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 21); cache.TypeRegistry.RegisterType(Position.CreateDeserializable, 22); var region = cache.CreateRegionFactory(RegionShortcut.PROXY) @@ -896,7 +896,7 @@ namespace Apache.Geode.Client.IntegrationTests var cache = cluster.CreateCache(); - cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 77); + cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 21); cache.TypeRegistry.RegisterType(TestClassA.CreateDeserializable, 100); cache.TypeRegistry.RegisterType(TestClassB.CreateDeserializable, 101); cache.TypeRegistry.RegisterType(TestClassC.CreateDeserializable, 102); diff --git a/cppcache/integration/test/CMakeLists.txt b/cppcache/integration/test/CMakeLists.txt index e7b1d4a..3f1029b 100644 --- a/cppcache/integration/test/CMakeLists.txt +++ b/cppcache/integration/test/CMakeLists.txt @@ -36,6 +36,10 @@ add_executable(cpp-integration-test PdxSerializerTest.cpp Order.cpp Order.hpp + Position.cpp + Position.hpp + PositionKey.cpp + PositionKey.hpp RegionGetAllTest.cpp RegionPutAllTest.cpp RegionPutGetAllTest.cpp diff --git a/cppcache/integration/test/DataSerializableTest.cpp b/cppcache/integration/test/DataSerializableTest.cpp index e413369..77e514a 100644 --- a/cppcache/integration/test/DataSerializableTest.cpp +++ b/cppcache/integration/test/DataSerializableTest.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include @@ -22,19 +23,23 @@ #include #include #include +#include #include #include #include +#include "Position.hpp" +#include "PositionKey.hpp" #include "framework/Cluster.h" -namespace { +namespace DataSerializableTest { using apache::geode::client::CacheableString; using apache::geode::client::CacheableStringArray; using apache::geode::client::DataInput; using apache::geode::client::DataOutput; using apache::geode::client::DataSerializable; +using apache::geode::client::FunctionService; using apache::geode::client::RegionShortcut; class Simple : public DataSerializable { @@ -162,4 +167,62 @@ TEST(DataSerializableTest, isSerializableAndDeserializable) { returnedArray->operator[](index)->toString()); } } -} // namespace + +TEST(DataSerializableTest, ClassAsKey) { + Cluster cluster{LocatorCount{1}, ServerCount{1}}; + + cluster.start(); + + cluster.getGfsh() + .create() + .region() + .withName("region") + .withType("PARTITION") + .execute(); + + cluster.getGfsh() + .deploy() + .jar(getFrameworkStrin
[geode-native] branch develop updated: GEODE-8775: Add gfsh execute function support (#708)
This is an automated email from the ASF dual-hosted git repository. mmartell pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 4dd2ceb GEODE-8775: Add gfsh execute function support (#708) 4dd2ceb is described below commit 4dd2ceb9ef0dd081039bad76cdb78a3a6cc0a2fd Author: Michael Martell AuthorDate: Tue Dec 15 20:23:11 2020 + GEODE-8775: Add gfsh execute function support (#708) * Add gfsh execute function support to the new C++ test framework. --- cppcache/integration/framework/Gfsh.cpp | 68 - cppcache/integration/framework/Gfsh.h | 37 +- 2 files changed, 78 insertions(+), 27 deletions(-) diff --git a/cppcache/integration/framework/Gfsh.cpp b/cppcache/integration/framework/Gfsh.cpp index 1001c15..17ad576 100644 --- a/cppcache/integration/framework/Gfsh.cpp +++ b/cppcache/integration/framework/Gfsh.cpp @@ -29,6 +29,8 @@ Gfsh::Shutdown Gfsh::shutdown() { return Shutdown{*this}; } Gfsh::Deploy Gfsh::deploy() { return Deploy(*this); } +Gfsh::ExecuteFunction Gfsh::executeFunction() { return ExecuteFunction(*this); } + Gfsh::Verb::Verb(Gfsh ) : gfsh_(gfsh) {} Gfsh::Start::Start(Gfsh ) : gfsh_(gfsh) {} @@ -60,16 +62,17 @@ Gfsh::Start::Locator ::Start::Locator::withPort(const uint16_t ) { return *this; } -Gfsh::Start::Locator ::Start::Locator::withRemoteLocators(const std::vector ) { +Gfsh::Start::Locator ::Start::Locator::withRemoteLocators( +const std::vector ) { // Example: --J='-Dgemfire.remote-locators=localhost[9009],localhost[9010]' - if ( !locatorPorts.empty() ) { + if (!locatorPorts.empty()) { command_ += " --J='-Dgemfire.remote-locators="; -bool firstLocator=true; +bool firstLocator = true; for (uint16_t locatorPort : locatorPorts) { - if (firstLocator){ + if (firstLocator) { command_ += "localhost[" + std::to_string(locatorPort) + "]"; -firstLocator=false; - }else{ +firstLocator = false; + } else { command_ += ",localhost[" + std::to_string(locatorPort) + "]"; } } @@ -78,9 +81,10 @@ Gfsh::Start::Locator ::Start::Locator::withRemoteLocators(const std::vector return *this; } -Gfsh::Start::Locator ::Start::Locator::withDistributedSystemId(const uint16_t ) { - if ( dsId != 0 ){ -command_ += " --J=-Dgemfire.distributed-system-id="+std::to_string(dsId); +Gfsh::Start::Locator ::Start::Locator::withDistributedSystemId( +const uint16_t ) { + if (dsId != 0) { +command_ += " --J=-Dgemfire.distributed-system-id=" + std::to_string(dsId); } return *this; } @@ -395,38 +399,49 @@ Gfsh::Create::Region ::Create::Region::withType(const std::string ) { return *this; } -Gfsh::Create::Region ::Create::Region::withRedundantCopies(const std::string ) { +Gfsh::Create::Region ::Create::Region::withRedundantCopies( +const std::string ) { command_ += " --redundant-copies=" + copies; return *this; } -Gfsh::Create::Region ::Create::Region::withBuckets(const std::string ) { +Gfsh::Create::Region ::Create::Region::withBuckets( +const std::string ) { command_ += " --total-num-buckets=" + totalNumBuckets; return *this; } -Gfsh::Create::Region ::Create::Region::withGatewaySenderId(const std::string ) { +Gfsh::Create::Region ::Create::Region::withGatewaySenderId( +const std::string ) { command_ += " --gateway-sender-id=" + gatewaySenderId; return *this; } -Gfsh::Create::GatewaySender Gfsh::Create::gatewaySender() { return GatewaySender{gfsh_}; } +Gfsh::Create::GatewaySender Gfsh::Create::gatewaySender() { + return GatewaySender{gfsh_}; +} -Gfsh::Create::GatewaySender::GatewaySender(Gfsh ) : Command(gfsh, "create gateway-sender") {} +Gfsh::Create::GatewaySender::GatewaySender(Gfsh ) +: Command(gfsh, "create gateway-sender") {} -Gfsh::Create::GatewaySender ::Create::GatewaySender::withId(const std::string ){ +Gfsh::Create::GatewaySender ::Create::GatewaySender::withId( +const std::string ) { command_ += " --id=" + id; return *this; } -Gfsh::Create::GatewaySender ::Create::GatewaySender::withRemoteDSId(const std::string ){ +Gfsh::Create::GatewaySender ::Create::GatewaySender::withRemoteDSId( +const std::string ) { command_ += " --remote-distributed-system-id=" + remoteDSId; return *this; } -Gfsh::Create::GatewayReceiver Gfsh::Create::gatewayReceiver() { return GatewayReceiver{gfsh_}; } +Gfsh::Create::GatewayReceiver Gfsh::Create::gatewayReceiver() { + return GatewayReceiver{gfsh_}; +} -Gfsh::Create::GatewayReceiver::GatewayReceiver(Gfsh ) : Command(gfsh, "create gateway-receiver") {} +Gfsh::Create::GatewayReceiver::GatewayReceiver(Gfsh ) +: Command(gfs