[ 
https://issues.apache.org/jira/browse/GEODE-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094408#comment-17094408
 ] 

ASF GitHub Bot commented on GEODE-7944:
---------------------------------------

jvarenina commented on a change in pull request #593:
URL: https://github.com/apache/geode-native/pull/593#discussion_r416532403



##########
File path: cppcache/test/QueueConnectionRequestTest.cpp
##########
@@ -0,0 +1,78 @@
+/*
+ * 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 <QueueConnectionRequest.hpp>
+
+#include <boost/process/environment.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/DataOutput.hpp>
+
+#include "ByteArrayFixture.hpp"
+#include "DataOutputInternal.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+inline std::string to_hex(const uint8_t* bytes, size_t len) {
+  std::stringstream ss;
+  ss << std::setfill('0') << std::hex;
+  for (size_t i(0); i < len; ++i) {
+    ss << std::setw(2) << static_cast<int>(bytes[i]);
+  }
+  return ss.str();
+}
+
+inline std::string to_hex(const DataOutput& out) {
+  return to_hex(out.getBuffer(), out.getBufferLength());
+}
+
+inline std::string int_to_hex_string(const int value) {
+  char hex[10];
+  sprintf(hex, "%x", value);
+  return std::string(hex);
+}
+
+TEST(QueueConnectionRequestTest, testToData) {

Review comment:
       I didn't create integration test, because It seemed to me that non of 
the functionality is affected with this bug beside debug logging in locator. 
Native client always sends QueueConnectionRequest with flag findDurable=false, 
so membershipId is never used for anything functional in locator, it is only 
logged at debug level.
   
   I have put more details related to this in mails sent towards 
[email protected], mail Subject: Unable to get behavior described in 
documentation when using durable native client




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

For queries about this service, please contact Infrastructure at:
[email protected]


> Unable to deserialize membership id java.io.EOFException on locator only when 
> debug is enabled and native client is used
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-7944
>                 URL: https://issues.apache.org/jira/browse/GEODE-7944
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Jakov Varenina
>            Assignee: Jakov Varenina
>            Priority: Major
>         Attachments: locator.log, native_client.log
>
>
> During the creation of pool in geode native with subscription "enabled" 
> exception java.io.EOFException is thrown on locator only when it is 
> configured with _--log-level=debug_. On geode native this reflects with "No 
> locators available". You can find native_client.log and locator.log in 
> attachment.
> Native client code: 
> {code:java}
> auto cache = cacheFactory.create();
> auto poolFactory = cache.getPoolManager().createFactory();
> auto pool = poolFactory.addLocator("localhost", 10334)
> .setSubscriptionEnabled(true)
> .create("pool");
> {code}
> With java client everything works OK.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to