[qpid-protonj2] 02/02: Remove an unused utility class missed in previous cleanup

2021-04-23 Thread tabish
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit 0e613e1c7871fd6b5c43ac43a25ee0e0abfdbd74
Author: Timothy Bish 
AuthorDate: Fri Apr 23 17:31:26 2021 -0400

Remove an unused utility class missed in previous cleanup

Used for aspect of URI processing this utility is not used as of yet and
can be removed.
---
 .../protonj2/client/util/StringArrayConverter.java | 64 ---
 .../client/util/StringArrayConverterTest.java  | 72 --
 2 files changed, 136 deletions(-)

diff --git 
a/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/util/StringArrayConverter.java
 
b/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/util/StringArrayConverter.java
deleted file mode 100644
index 796d159..000
--- 
a/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/util/StringArrayConverter.java
+++ /dev/null
@@ -1,64 +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.
- */
-package org.apache.qpid.protonj2.client.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-/**
- * Class for converting to/from String[] to be used instead of a
- * {@link java.beans.PropertyEditor} which otherwise causes memory leaks as the
- * JDK {@link java.beans.PropertyEditorManager} is a static class and has 
strong
- * references to classes, causing problems in hot-deployment environments.
- */
-public class StringArrayConverter {
-
-public static String[] convertToStringArray(Object value) {
-if (value == null) {
-return null;
-}
-
-String text = value.toString();
-if (text == null || text.isEmpty()) {
-return null;
-}
-
-StringTokenizer stok = new StringTokenizer(text, ",");
-final List list = new ArrayList();
-
-while (stok.hasMoreTokens()) {
-list.add(stok.nextToken());
-}
-
-String[] array = list.toArray(new String[list.size()]);
-return array;
-}
-
-public static String convertToString(String[] value) {
-if (value == null || value.length == 0) {
-return null;
-}
-
-StringBuffer result = new StringBuffer(String.valueOf(value[0]));
-for (int i = 1; i < value.length; i++) {
-result.append(",").append(value[i]);
-}
-
-return result.toString();
-}
-}
diff --git 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/util/StringArrayConverterTest.java
 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/util/StringArrayConverterTest.java
deleted file mode 100644
index 7ed7a45..000
--- 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/util/StringArrayConverterTest.java
+++ /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.
- */
-package org.apache.qpid.protonj2.client.util;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-
-import org.apache.qpid.protonj2.client.test.ImperativeClientTestCase;
-import org.junit.jupiter.api.Test;
-
-public class StringArrayConverterTest extends ImperativeClientTestCase {
-
-private class NulToStringValue {
-
-@Override
-public String toString() {
-return null;
-}
-  

[qpid-protonj2] branch main updated (8a2ceda -> 0e613e1)

2021-04-23 Thread tabish
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git.


from 8a2ceda  Update Mockito to latest v3.9.0
 new 08f9c87  Adds more javadocs to the client APIs and hides some 
constructors
 new 0e613e1  Remove an unused utility class missed in previous cleanup

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.


Summary of changes:
 .../apache/qpid/protonj2/client/ClientOptions.java |  9 +++
 .../qpid/protonj2/client/ConnectionOptions.java|  3 +
 .../apache/qpid/protonj2/client/DeliveryState.java | 53 
 .../qpid/protonj2/client/ReceiverOptions.java  |  9 +++
 .../qpid/protonj2/client/ReconnectOptions.java |  2 +-
 .../apache/qpid/protonj2/client/SaslOptions.java   |  6 ++
 .../apache/qpid/protonj2/client/SenderOptions.java |  9 +++
 .../qpid/protonj2/client/SessionOptions.java   |  9 +++
 .../apache/qpid/protonj2/client/SourceOptions.java |  9 +++
 .../apache/qpid/protonj2/client/SslOptions.java| 11 
 .../qpid/protonj2/client/TransportOptions.java | 52 ++--
 .../client/futures/BalancedClientFuture.java   |  9 +++
 .../qpid/protonj2/client/futures/ClientFuture.java |  6 ++
 .../client/futures/ClientFutureFactory.java| 22 +++
 .../client/futures/ClientSynchronization.java  | 12 
 .../client/futures/ConservativeClientFuture.java   |  9 +++
 .../protonj2/client/futures/NoOpAsyncResult.java   |  3 +
 .../client/futures/ProgressiveClientFuture.java|  9 +++
 .../client/impl/ClientConnectionCapabilities.java  |  5 +-
 .../protonj2/client/impl/ClientErrorCondition.java | 16 +
 .../client/impl/ClientExceptionSupport.java|  2 +-
 .../qpid/protonj2/client/impl/ClientInstance.java  |  9 +++
 .../client/impl/ClientLocalTransactionContext.java |  2 +-
 .../qpid/protonj2/client/impl/ClientMessage.java   |  7 +++
 .../client/impl/ClientNoOpStreamTracker.java   |  2 +-
 .../protonj2/client/impl/ClientNoOpTracker.java|  2 +-
 .../client/impl/ClientOutgoingEnvelope.java|  4 +-
 .../qpid/protonj2/client/impl/ClientReceiver.java  |  5 +-
 .../client/impl/ClientReceiverBuilder.java |  2 +-
 .../qpid/protonj2/client/impl/ClientRedirect.java  |  2 +-
 .../qpid/protonj2/client/impl/ClientSender.java|  2 +-
 .../protonj2/client/impl/ClientSenderBuilder.java  |  2 +-
 .../qpid/protonj2/client/impl/ClientSession.java   |  2 +-
 .../protonj2/client/impl/ClientSessionBuilder.java |  2 +-
 .../protonj2/client/impl/ClientStreamDelivery.java |  6 +-
 .../protonj2/client/impl/ClientStreamReceiver.java |  5 +-
 .../protonj2/client/impl/ClientStreamSender.java   |  5 +-
 .../protonj2/client/impl/ClientStreamSession.java  |  2 +-
 .../protonj2/client/impl/ClientStreamTracker.java  |  2 +-
 .../client/impl/ClientTransportListener.java   |  2 +-
 .../protonj2/client/util/FifoDeliveryQueue.java|  6 ++
 .../qpid/protonj2/client/util/IdGenerator.java |  3 +
 .../protonj2/client/util/StringArrayConverter.java | 64 ---
 .../qpid/protonj2/client/util/ThreadPoolUtils.java |  3 +
 .../client/util/StringArrayConverterTest.java  | 72 --
 45 files changed, 317 insertions(+), 161 deletions(-)
 delete mode 100644 
protonj2-client/src/main/java/org/apache/qpid/protonj2/client/util/StringArrayConverter.java
 delete mode 100644 
protonj2-client/src/test/java/org/apache/qpid/protonj2/client/util/StringArrayConverterTest.java

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-protonj2] 01/02: Adds more javadocs to the client APIs and hides some constructors

2021-04-23 Thread tabish
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit 08f9c871acdcd1844f31509ea1518d4367b71635
Author: Timothy Bish 
AuthorDate: Fri Apr 23 17:24:15 2021 -0400

Adds more javadocs to the client APIs and hides some constructors

Further document client level APIs and internal public methods to aid in
use.  Hides some constructors as package level scoped to protect them
from outsiders using them in breaking ways.
---
 .../apache/qpid/protonj2/client/ClientOptions.java |  9 
 .../qpid/protonj2/client/ConnectionOptions.java|  3 ++
 .../apache/qpid/protonj2/client/DeliveryState.java | 53 ++
 .../qpid/protonj2/client/ReceiverOptions.java  |  9 
 .../qpid/protonj2/client/ReconnectOptions.java |  2 +-
 .../apache/qpid/protonj2/client/SaslOptions.java   |  6 +++
 .../apache/qpid/protonj2/client/SenderOptions.java |  9 
 .../qpid/protonj2/client/SessionOptions.java   |  9 
 .../apache/qpid/protonj2/client/SourceOptions.java |  9 
 .../apache/qpid/protonj2/client/SslOptions.java| 11 +
 .../qpid/protonj2/client/TransportOptions.java | 52 +++--
 .../client/futures/BalancedClientFuture.java   |  9 
 .../qpid/protonj2/client/futures/ClientFuture.java |  6 +++
 .../client/futures/ClientFutureFactory.java| 22 +
 .../client/futures/ClientSynchronization.java  | 12 +
 .../client/futures/ConservativeClientFuture.java   |  9 
 .../protonj2/client/futures/NoOpAsyncResult.java   |  3 ++
 .../client/futures/ProgressiveClientFuture.java|  9 
 .../client/impl/ClientConnectionCapabilities.java  |  5 +-
 .../protonj2/client/impl/ClientErrorCondition.java | 16 +++
 .../client/impl/ClientExceptionSupport.java|  2 +-
 .../qpid/protonj2/client/impl/ClientInstance.java  |  9 
 .../client/impl/ClientLocalTransactionContext.java |  2 +-
 .../qpid/protonj2/client/impl/ClientMessage.java   |  7 +++
 .../client/impl/ClientNoOpStreamTracker.java   |  2 +-
 .../protonj2/client/impl/ClientNoOpTracker.java|  2 +-
 .../client/impl/ClientOutgoingEnvelope.java|  4 +-
 .../qpid/protonj2/client/impl/ClientReceiver.java  |  5 +-
 .../client/impl/ClientReceiverBuilder.java |  2 +-
 .../qpid/protonj2/client/impl/ClientRedirect.java  |  2 +-
 .../qpid/protonj2/client/impl/ClientSender.java|  2 +-
 .../protonj2/client/impl/ClientSenderBuilder.java  |  2 +-
 .../qpid/protonj2/client/impl/ClientSession.java   |  2 +-
 .../protonj2/client/impl/ClientSessionBuilder.java |  2 +-
 .../protonj2/client/impl/ClientStreamDelivery.java |  6 ++-
 .../protonj2/client/impl/ClientStreamReceiver.java |  5 +-
 .../protonj2/client/impl/ClientStreamSender.java   |  5 +-
 .../protonj2/client/impl/ClientStreamSession.java  |  2 +-
 .../protonj2/client/impl/ClientStreamTracker.java  |  2 +-
 .../client/impl/ClientTransportListener.java   |  2 +-
 .../protonj2/client/util/FifoDeliveryQueue.java|  6 +++
 .../qpid/protonj2/client/util/IdGenerator.java |  3 ++
 .../qpid/protonj2/client/util/ThreadPoolUtils.java |  3 ++
 43 files changed, 317 insertions(+), 25 deletions(-)

diff --git 
a/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ClientOptions.java
 
b/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ClientOptions.java
index d9a2435..6c612c2 100644
--- 
a/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ClientOptions.java
+++ 
b/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ClientOptions.java
@@ -24,8 +24,17 @@ public class ClientOptions {
 private String id;
 private String futureType;
 
+/**
+ * Create a new ClientOptions instance with defaults set for all options.
+ */
 public ClientOptions() {}
 
+/**
+ * Create a new ClientOptions instance that copies the configuration from 
the specified source options.
+ *
+ * @param options
+ * The ClientOptions instance whose settings are to be 
copied into this one.
+ */
 public ClientOptions(ClientOptions options) {
 if (options != null) {
 options.copyInto(this);
diff --git 
a/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ConnectionOptions.java
 
b/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ConnectionOptions.java
index d444894..7f1750e 100644
--- 
a/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ConnectionOptions.java
+++ 
b/protonj2-client/src/main/java/org/apache/qpid/protonj2/client/ConnectionOptions.java
@@ -30,6 +30,9 @@ import org.apache.qpid.protonj2.types.transport.Open;
  */
 public class ConnectionOptions {
 
+   /**
+* Default value for the AMQP desired capabilities set in the Open 
frame.
+*/
 public static final String[] DEFAULT_DESIRED_CAPABILITIES = new String[] { 

[qpid-dispatch] branch main updated: DISPATCH-2074: Remove unused function

2021-04-23 Thread chug
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
 new 49d84ea  DISPATCH-2074: Remove unused function
49d84ea is described below

commit 49d84eab4be0bf0627895f23ec7f6fc728f03fe9
Author: Chuck Rolke 
AuthorDate: Fri Apr 23 16:52:03 2021 -0400

DISPATCH-2074: Remove unused function
---
 src/adaptors/tcp_adaptor.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/src/adaptors/tcp_adaptor.c b/src/adaptors/tcp_adaptor.c
index f6cbe7f..2f895ab 100644
--- a/src/adaptors/tcp_adaptor.c
+++ b/src/adaptors/tcp_adaptor.c
@@ -119,12 +119,6 @@ static inline uint64_t qdr_tcp_conn_linkid(const 
qdr_tcp_connection_t *conn)
 return conn->instream ? conn->incoming_id : conn->outgoing_id;
 }
 
-static inline const char * qdr_link_direction_name(const qdr_link_t *link)
-{
-assert(link);
-return qdr_link_direction(link) == QD_OUTGOING ? "outgoing" : "incoming";
-}
-
 static inline const char * qdr_tcp_connection_role_name(const 
qdr_tcp_connection_t *tc)
 {
 assert(tc);

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch main updated: DISPATCH-2075: Bump required proton to 0.34

2021-04-23 Thread chug
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
 new 5955ba6  DISPATCH-2075: Bump required proton to 0.34
5955ba6 is described below

commit 5955ba6210e726a76fc98ab338ba13a10048ae43
Author: Chuck Rolke 
AuthorDate: Fri Apr 23 16:50:19 2021 -0400

DISPATCH-2075: Bump required proton to 0.34
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8d4d0a..a05369f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,7 @@ if (NOT DEFINED Python_FIND_FRAMEWORK)
 endif ()
 find_package(Python REQUIRED COMPONENTS Interpreter Development)
 find_package(Threads REQUIRED)
-find_package(Proton 0.33.0 REQUIRED COMPONENTS Core Proactor)
+find_package(Proton 0.34.0 REQUIRED COMPONENTS Core Proactor)
 message(STATUS "Found Proton: ${Proton_LIBRARIES} (found version 
\"${Proton_VERSION}\")" )
 ##
 ## Optional dependencies

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch main updated: DISPATCH-1878: fix log format specifier

2021-04-23 Thread chug
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
 new e354322  DISPATCH-1878: fix log format specifier
e354322 is described below

commit e354322bcf5081bac2b5c48b1a893f8fdd0b126a
Author: Chuck Rolke 
AuthorDate: Fri Apr 23 14:10:45 2021 -0400

DISPATCH-1878: fix log format specifier
---
 src/adaptors/tcp_adaptor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adaptors/tcp_adaptor.c b/src/adaptors/tcp_adaptor.c
index 9fcf267..f6cbe7f 100644
--- a/src/adaptors/tcp_adaptor.c
+++ b/src/adaptors/tcp_adaptor.c
@@ -338,7 +338,7 @@ static int handle_incoming(qdr_tcp_connection_t *conn, 
const char *msg)
 conn->instream = qdr_link_deliver(conn->incoming, msg, 0, false, 0, 0, 
0, 0);
 
 qd_log(log, QD_LOG_DEBUG,
-   "[C%"PRIu64"][L%"PRIu64"][D%"PRIu64"] Initiating ingress stream 
message with 0 bytes",
+   "[C%"PRIu64"][L%"PRIu64"][D%"PRIu32"] Initiating ingress stream 
message with 0 bytes",
conn->conn_id, conn->incoming_id, conn->instream->delivery_id);
 
 conn->incoming_started = true;

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-protonj2] branch main updated: Update Mockito to latest v3.9.0

2021-04-23 Thread tabish
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git


The following commit(s) were added to refs/heads/main by this push:
 new 8a2ceda  Update Mockito to latest v3.9.0
8a2ceda is described below

commit 8a2ceda46a0f5fefbb511a46ba1db824ece0327c
Author: Timothy Bish 
AuthorDate: Fri Apr 23 11:52:14 2021 -0400

Update Mockito to latest v3.9.0
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 3fd6209..b6256c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
 
 5.7.1
 5.7.1
-3.8.0
+3.9.0
 0.33.8
 1.7.30
 2.14.1

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-protonj2] branch main updated: Adjust some unrealistic timeouts for receive when in CI

2021-04-23 Thread tabish
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git


The following commit(s) were added to refs/heads/main by this push:
 new bc09785  Adjust some unrealistic timeouts for receive when in CI
bc09785 is described below

commit bc09785d0618db83fb3b54ad41f894569487e315
Author: Timothy Bish 
AuthorDate: Fri Apr 23 11:22:50 2021 -0400

Adjust some unrealistic timeouts for receive when in CI

Some CI tests can fail due to the overly short receive timeouts where
don't give enough time for round trip of the transfer.
---
 .../org/apache/qpid/protonj2/client/impl/ReceiverTest.java   | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
index 8a16d88..f23c639 100644
--- 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
+++ 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
@@ -1525,7 +1525,7 @@ public class ReceiverTest extends 
ImperativeClientTestCase {
 
 peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
 
-assertNull(receiver.receive(10, TimeUnit.MILLISECONDS));
+assertNull(receiver.receive(15, TimeUnit.MILLISECONDS));
 
 peer.expectDetach().respond();
 peer.expectClose().respond();
@@ -1642,7 +1642,7 @@ public class ReceiverTest extends 
ImperativeClientTestCase {
 
 peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
 
-assertNull(receiver.receive(10, TimeUnit.MILLISECONDS));
+assertNull(receiver.receive(15, TimeUnit.MILLISECONDS));
 
 // Credit window is one and next transfer signals aborted so 
receiver should
 // top-up the credit window to allow more transfers to arrive.
@@ -2185,7 +2185,7 @@ public class ReceiverTest extends 
ImperativeClientTestCase {
 peer.expectDetach().respond();
 peer.expectClose().respond();
 
-Delivery delivery = receiver.receive(10, TimeUnit.MILLISECONDS);
+Delivery delivery = receiver.receive(5, TimeUnit.SECONDS);
 assertNotNull(delivery);
 
 Message message = delivery.message();
@@ -2287,7 +2287,7 @@ public class ReceiverTest extends 
ImperativeClientTestCase {
 peer.expectDetach().respond();
 peer.expectClose().respond();
 
-Delivery delivery = receiver.receive(10, TimeUnit.MILLISECONDS);
+Delivery delivery = receiver.receive(5, TimeUnit.SECONDS);
 assertNotNull(delivery);
 InputStream stream = delivery.rawInputStream();
 assertNotNull(stream);
@@ -2354,7 +2354,7 @@ public class ReceiverTest extends 
ImperativeClientTestCase {
 peer.expectDetach().respond();
 peer.expectClose().respond();
 
-Delivery delivery = receiver.receive(10, TimeUnit.MILLISECONDS);
+Delivery delivery = receiver.receive(5, TimeUnit.SECONDS);
 assertNotNull(delivery);
 
 AdvancedMessage message = 
delivery.message().toAdvancedMessage();
@@ -2417,7 +2417,7 @@ public class ReceiverTest extends 
ImperativeClientTestCase {
 peer.expectDetach().respond();
 peer.expectClose().respond();
 
-Delivery delivery = receiver.receive(10, TimeUnit.MILLISECONDS);
+Delivery delivery = receiver.receive(5, TimeUnit.SECONDS);
 assertNotNull(delivery);
 
 InputStream stream = delivery.rawInputStream();

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-protonj2] branch main updated: Remove the unused sports plugin in the maven reporting definition

2021-04-23 Thread tabish
This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git


The following commit(s) were added to refs/heads/main by this push:
 new 789050f  Remove the unused sports plugin in the maven reporting 
definition
789050f is described below

commit 789050f46e111f747c613ad892ebf63a63e12a07
Author: Timothy Bish 
AuthorDate: Fri Apr 23 11:08:08 2021 -0400

Remove the unused sports plugin in the maven reporting definition
---
 pom.xml | 5 -
 1 file changed, 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5d83a50..3fd6209 100644
--- a/pom.xml
+++ b/pom.xml
@@ -347,11 +347,6 @@
   
 
   
-com.github.spotbugs
-spotbugs-maven-plugin
-${spotbugs-maven-plugin-version}
-  
-  
 org.jacoco
 jacoco-maven-plugin
 ${jacoco.plugin.version}

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch main updated: DISPATCH-1878: Handle half-closed TCP connections without losing data

2021-04-23 Thread chug
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
 new d288c21  DISPATCH-1878: Handle half-closed TCP connections without 
losing data
d288c21 is described below

commit d288c21fe5ecc7a2d78eaf1f38e973fce2356e45
Author: Chuck Rolke 
AuthorDate: Fri Apr 23 09:27:15 2021 -0400

DISPATCH-1878: Handle half-closed TCP connections without losing data

Restructure the code several ways to handle closed reads and closed
writes without necessarily closing the whole connection and losing data
in flight.

This is a squashed and rebased commit of work during development and
tracked under PR#1129.

This closes #1129
---
 src/adaptors/tcp_adaptor.c | 539 ++---
 1 file changed, 365 insertions(+), 174 deletions(-)

diff --git a/src/adaptors/tcp_adaptor.c b/src/adaptors/tcp_adaptor.c
index eb10f8a..9fcf267 100644
--- a/src/adaptors/tcp_adaptor.c
+++ b/src/adaptors/tcp_adaptor.c
@@ -57,11 +57,14 @@ struct qdr_tcp_connection_t {
 qdr_delivery_t   *outstream;
 bool  ingress;
 bool  flow_enabled;
+bool  incoming_started;
 bool  egress_dispatcher;
 bool  connector_closed;//only used if 
egress_dispatcher=true
 bool  in_list; // This connection is in the 
adaptor's connections list
-bool  raw_closed_read;
-bool  raw_closed_write;
+bool  raw_closed_read;   // proton event seen
+bool  raw_closed_write;  // proton event seen or 
write_close called
+bool  raw_read_shutdown; // stream closed
+bool  read_eos_seen;
 qdr_delivery_t   *initial_delivery;
 qd_timer_t   *activate_timer;
 qd_bridge_config_tconfig;
@@ -116,6 +119,26 @@ static inline uint64_t qdr_tcp_conn_linkid(const 
qdr_tcp_connection_t *conn)
 return conn->instream ? conn->incoming_id : conn->outgoing_id;
 }
 
+static inline const char * qdr_link_direction_name(const qdr_link_t *link)
+{
+assert(link);
+return qdr_link_direction(link) == QD_OUTGOING ? "outgoing" : "incoming";
+}
+
+static inline const char * qdr_tcp_connection_role_name(const 
qdr_tcp_connection_t *tc)
+{
+assert(tc);
+return tc->ingress ? "listener" : "connector";
+}
+
+static const char * qdr_tcp_quadrant_id(const qdr_tcp_connection_t *tc, const 
qdr_link_t *link)
+{
+if (tc->ingress)
+return link->link_direction == QD_INCOMING ? "(listener incoming)" : 
"(listener outgoing)";
+else
+return link->link_direction == QD_INCOMING ? "(connector incoming)" : 
"(connector outgoing)";
+}
+
 static void on_activate(void *context)
 {
 qdr_tcp_connection_t* conn = (qdr_tcp_connection_t*) context;
@@ -136,22 +159,22 @@ static void grant_read_buffers(qdr_tcp_connection_t *conn)
 
 pn_raw_buffer_t raw_buffers[READ_BUFFERS];
 // Give proactor more read buffers for the socket
-if (!pn_raw_connection_is_read_closed(conn->pn_raw_conn)) {
-size_t desired = 
pn_raw_connection_read_buffers_capacity(conn->pn_raw_conn);
-qd_log(tcp_adaptor->log_source, QD_LOG_DEBUG, "[C%"PRIu64"] Granted 
%zu read buffers", conn->conn_id, desired);
-while (desired) {
-size_t i;
-for (i = 0; i < desired && i < READ_BUFFERS; ++i) {
-qd_buffer_t *buf = qd_buffer();
-raw_buffers[i].bytes = (char*) qd_buffer_base(buf);
-raw_buffers[i].capacity = qd_buffer_capacity(buf);
-raw_buffers[i].size = 0;
-raw_buffers[i].offset = 0;
-raw_buffers[i].context = (uintptr_t) buf;
-}
-desired -= i;
-pn_raw_connection_give_read_buffers(conn->pn_raw_conn, 
raw_buffers, i);
+size_t desired = 
pn_raw_connection_read_buffers_capacity(conn->pn_raw_conn);
+qd_log(tcp_adaptor->log_source, QD_LOG_DEBUG,
+"[C%"PRIu64"][L%"PRIu64"] Granting %zu to 
pn_raw_connection_give_read_buffers()",
+conn->conn_id, conn->incoming_id, desired);
+while (desired) {
+size_t i;
+for (i = 0; i < desired && i < READ_BUFFERS; ++i) {
+qd_buffer_t *buf = qd_buffer();
+raw_buffers[i].bytes = (char*) qd_buffer_base(buf);
+raw_buffers[i].capacity = qd_buffer_capacity(buf);
+raw_buffers[i].size = 0;
+raw_buffers[i].offset = 0;
+raw_buffers[i].context = (uintptr_t) buf;
 }
+desired -= i;
+pn_raw_connection_give_read_buffers(conn->pn_raw_conn, raw_buffers, i);
 }
 }
 
@@ -175,6 +198,9 @@ void qdr_tcp_q2_unblocked_handler(const qd_alloc_safe_ptr_t 
context)
 
 if