You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2014/11/28 14:49:43 UTC
[05/51] [abbrv] qpid-proton git commit: Pulling in changes from
proton r1590241
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SenderImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SenderImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SenderImpl.java
index df0afc4..1ca8b52 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SenderImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SenderImpl.java
@@ -119,5 +119,4 @@ public class SenderImpl extends LinkImpl implements Sender
advance();
}*/
}
-
}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SessionImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SessionImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SessionImpl.java
index 427ffeb..f95df27 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SessionImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SessionImpl.java
@@ -24,6 +24,7 @@ import java.util.*;
import org.apache.qpid.proton.engine.EndpointState;
import org.apache.qpid.proton.engine.ProtonJSession;
import org.apache.qpid.proton.engine.Session;
+import org.apache.qpid.proton.engine.Event;
public class SessionImpl extends EndpointImpl implements ProtonJSession
{
@@ -182,4 +183,12 @@ public class SessionImpl extends EndpointImpl implements ProtonJSession
_outgoingDeliveries += delta;
}
+ @Override
+ protected void localStateChanged()
+ {
+ EventImpl ev = getConnectionImpl().put(Event.Type.SESSION_LOCAL_STATE);
+ if (ev != null) {
+ ev.init(this);
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
index 5e2c81e..1949652 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
@@ -76,8 +76,8 @@ public class TransportImpl extends EndpointImpl
private boolean _isCloseSent;
private boolean _headerWritten;
- private TransportSession[] _remoteSessions;
- private TransportSession[] _localSessions;
+ private Map<Integer, TransportSession> _remoteSessions = new HashMap<Integer, TransportSession>();
+ private Map<Integer, TransportSession> _localSessions = new HashMap<Integer, TransportSession>();
private TransportInput _inputProcessor;
private TransportOutput _outputProcessor;
@@ -198,10 +198,6 @@ public class TransportImpl extends EndpointImpl
((ConnectionImpl) conn).setTransport(this);
_connectionEndpoint = (ConnectionImpl) conn;
- _localSessions = new TransportSession[_connectionEndpoint.getMaxChannels()+1];
- _remoteSessions = new TransportSession[_connectionEndpoint.getMaxChannels()+1];
-
-
if(getRemoteState() != EndpointState.UNINITIALIZED)
{
_connectionEndpoint.handleOpen(_open);
@@ -802,22 +798,23 @@ public class TransportImpl extends EndpointImpl
private int allocateLocalChannel(TransportSession transportSession)
{
- for( int i=0; i < _localSessions.length; i++)
+ for (int i = 0; i < _connectionEndpoint.getMaxChannels(); i++)
{
- if( _localSessions[i] == null )
+ if (!_localSessions.containsKey(i))
{
- _localSessions[i] = transportSession;
+ _localSessions.put(i, transportSession);
transportSession.setLocalChannel(i);
return i;
}
}
+
return -1;
}
private int freeLocalChannel(TransportSession transportSession)
{
final int channel = transportSession.getLocalChannel();
- _localSessions[channel] = null;
+ _localSessions.remove(channel);
transportSession.freeLocalChannel();
return channel;
}
@@ -953,7 +950,7 @@ public class TransportImpl extends EndpointImpl
public void handleBegin(Begin begin, Binary payload, Integer channel)
{
// TODO - check channel < max_channel
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession != null)
{
// TODO - fail due to begin on begun session
@@ -969,16 +966,16 @@ public class TransportImpl extends EndpointImpl
else
{
// TODO check null
- transportSession = _localSessions[begin.getRemoteChannel().intValue()];
+ transportSession = _localSessions.get(begin.getRemoteChannel().intValue());
session = transportSession.getSession();
}
transportSession.setRemoteChannel(channel);
session.setRemoteState(EndpointState.ACTIVE);
transportSession.setNextIncomingId(begin.getNextOutgoingId());
- _remoteSessions[channel] = transportSession;
+ _remoteSessions.put(channel, transportSession);
- EventImpl ev = _connectionEndpoint.put(Event.Type.SESSION_STATE);
+ EventImpl ev = _connectionEndpoint.put(Event.Type.SESSION_REMOTE_STATE);
if (ev != null) {
ev.init(session);
}
@@ -989,7 +986,7 @@ public class TransportImpl extends EndpointImpl
@Override
public void handleAttach(Attach attach, Binary payload, Integer channel)
{
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession == null)
{
// TODO - fail due to attach on non-begun session
@@ -1037,7 +1034,7 @@ public class TransportImpl extends EndpointImpl
}
- EventImpl ev = _connectionEndpoint.put(Event.Type.LINK_STATE);
+ EventImpl ev = _connectionEndpoint.put(Event.Type.LINK_REMOTE_STATE);
if (ev != null) {
ev.init(link);
}
@@ -1047,7 +1044,7 @@ public class TransportImpl extends EndpointImpl
@Override
public void handleFlow(Flow flow, Binary payload, Integer channel)
{
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession == null)
{
// TODO - fail due to attach on non-begun session
@@ -1063,7 +1060,7 @@ public class TransportImpl extends EndpointImpl
public void handleTransfer(Transfer transfer, Binary payload, Integer channel)
{
// TODO - check channel < max_channel
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession != null)
{
transportSession.handleTransfer(transfer, payload);
@@ -1077,7 +1074,7 @@ public class TransportImpl extends EndpointImpl
@Override
public void handleDisposition(Disposition disposition, Binary payload, Integer channel)
{
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession == null)
{
// TODO - fail due to attach on non-begun session
@@ -1091,7 +1088,7 @@ public class TransportImpl extends EndpointImpl
@Override
public void handleDetach(Detach detach, Binary payload, Integer channel)
{
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession == null)
{
// TODO - fail due to attach on non-begun session
@@ -1111,7 +1108,7 @@ public class TransportImpl extends EndpointImpl
link.getRemoteCondition().copyFrom(detach.getError());
}
- EventImpl ev = _connectionEndpoint.put(Event.Type.LINK_STATE);
+ EventImpl ev = _connectionEndpoint.put(Event.Type.LINK_REMOTE_STATE);
if (ev != null) {
ev.init(link);
}
@@ -1126,14 +1123,14 @@ public class TransportImpl extends EndpointImpl
@Override
public void handleEnd(End end, Binary payload, Integer channel)
{
- TransportSession transportSession = _remoteSessions[channel];
+ TransportSession transportSession = _remoteSessions.get(channel);
if(transportSession == null)
{
// TODO - fail due to attach on non-begun session
}
else
{
- _remoteSessions[channel] = null;
+ _remoteSessions.remove(channel);
transportSession.receivedEnd();
SessionImpl session = transportSession.getSession();
session.setRemoteState(EndpointState.CLOSED);
@@ -1143,7 +1140,7 @@ public class TransportImpl extends EndpointImpl
session.getRemoteCondition().copyFrom(errorCondition);
}
- EventImpl ev = _connectionEndpoint.put(Event.Type.SESSION_STATE);
+ EventImpl ev = _connectionEndpoint.put(Event.Type.SESSION_REMOTE_STATE);
if (ev != null) {
ev.init(session);
}
@@ -1163,7 +1160,7 @@ public class TransportImpl extends EndpointImpl
_connectionEndpoint.getRemoteCondition().copyFrom(close.getError());
}
- EventImpl ev = _connectionEndpoint.put(Event.Type.CONNECTION_STATE);
+ EventImpl ev = _connectionEndpoint.put(Event.Type.CONNECTION_REMOTE_STATE);
if (ev != null) {
ev.init(_connectionEndpoint);
}
@@ -1368,4 +1365,8 @@ public class TransportImpl extends EndpointImpl
}
}
+ @Override
+ protected void localStateChanged()
+ {
+ }
}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java
index 560c137..272756d 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java
@@ -44,6 +44,20 @@ public class MessageImpl implements ProtonJMessage
private Section _body;
private Footer _footer;
private MessageFormat _format = MessageFormat.DATA;
+
+ private static class EncoderDecoderPair {
+ DecoderImpl decoder = new DecoderImpl();
+ EncoderImpl encoder = new EncoderImpl(decoder);
+ {
+ AMQPDefinedTypes.registerAllTypes(decoder, encoder);
+ }
+ }
+
+ private static final ThreadLocal<EncoderDecoderPair> tlsCodec = new ThreadLocal<EncoderDecoderPair>() {
+ @Override protected EncoderDecoderPair initialValue() {
+ return new EncoderDecoderPair();
+ }
+ };
/**
* @deprecated This constructor's visibility will be reduced to the default scope in a future release.
@@ -559,10 +573,7 @@ public class MessageImpl implements ProtonJMessage
@Override
public int decode(byte[] data, int offset, int length)
{
- DecoderImpl decoder = new DecoderImpl();
- EncoderImpl encoder = new EncoderImpl(decoder);
-
- AMQPDefinedTypes.registerAllTypes(decoder, encoder);
+ DecoderImpl decoder = tlsCodec.get().decoder;
final ByteBuffer buffer = ByteBuffer.wrap(data, offset, length);
decoder.setByteBuffer(buffer);
@@ -668,6 +679,8 @@ public class MessageImpl implements ProtonJMessage
}
+ decoder.setByteBuffer(null);
+
return length-buffer.remaining();
}
@@ -695,9 +708,7 @@ public class MessageImpl implements ProtonJMessage
public int encode(WritableBuffer buffer)
{
int length = buffer.remaining();
- DecoderImpl decoder = new DecoderImpl();
- EncoderImpl encoder = new EncoderImpl(decoder);
- AMQPDefinedTypes.registerAllTypes(decoder, encoder);
+ EncoderImpl encoder = tlsCodec.get().encoder;
encoder.setByteBuffer(buffer);
if(getHeader() != null)
@@ -728,6 +739,7 @@ public class MessageImpl implements ProtonJMessage
{
encoder.writeObject(getFooter());
}
+ encoder.setByteBuffer((WritableBuffer)null);
return length - buffer.remaining();
}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/main/java/org/apache/qpid/proton/messenger/impl/Address.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/messenger/impl/Address.java b/proton-j/src/main/java/org/apache/qpid/proton/messenger/impl/Address.java
index be94189..ff9fbbe 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/messenger/impl/Address.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/messenger/impl/Address.java
@@ -87,12 +87,24 @@ class Address
hp = uphp;
}
- int colon = hp.indexOf(':');
- if (colon >= 0) {
- _host = hp.substring(0, colon);
- _port = hp.substring(colon + 1);
- } else {
- _host = hp;
+ if (hp.startsWith("[")) {
+ int close = hp.indexOf(']');
+ if (close >= 0) {
+ _host = hp.substring(1, close);
+ if (hp.substring(close + 1).startsWith(":")) {
+ _port = hp.substring(close + 2);
+ }
+ }
+ }
+
+ if (_host == null) {
+ int colon = hp.indexOf(':');
+ if (colon >= 0) {
+ _host = hp.substring(0, colon);
+ _port = hp.substring(colon + 1);
+ } else {
+ _host = hp;
+ }
}
if (_host.startsWith("~")) {
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/main/resources/cengine.py
----------------------------------------------------------------------
diff --git a/proton-j/src/main/resources/cengine.py b/proton-j/src/main/resources/cengine.py
index c61da07..320f539 100644
--- a/proton-j/src/main/resources/cengine.py
+++ b/proton-j/src/main/resources/cengine.py
@@ -938,9 +938,14 @@ def pn_transport_error(trans):
from org.apache.qpid.proton.engine import Event
-PN_CONNECTION_STATE = Event.Type.CONNECTION_STATE
-PN_SESSION_STATE = Event.Type.SESSION_STATE
-PN_LINK_STATE = Event.Type.LINK_STATE
+PN_EVENT_CATEGORY_PROTOCOL = Event.Category.PROTOCOL
+
+PN_CONNECTION_LOCAL_STATE = Event.Type.CONNECTION_LOCAL_STATE
+PN_CONNECTION_REMOTE_STATE = Event.Type.CONNECTION_REMOTE_STATE
+PN_SESSION_LOCAL_STATE = Event.Type.SESSION_LOCAL_STATE
+PN_SESSION_REMOTE_STATE = Event.Type.SESSION_REMOTE_STATE
+PN_LINK_LOCAL_STATE = Event.Type.LINK_LOCAL_STATE
+PN_LINK_REMOTE_STATE = Event.Type.LINK_REMOTE_STATE
PN_LINK_FLOW = Event.Type.LINK_FLOW
PN_DELIVERY = Event.Type.DELIVERY
PN_TRANSPORT = Event.Type.TRANSPORT
@@ -957,6 +962,9 @@ def pn_collector_peek(coll):
def pn_collector_pop(coll):
coll.pop()
+def pn_collector_free(coll):
+ pass
+
def pn_event_connection(event):
return wrap(event.getConnection(), pn_connection_wrapper)
@@ -972,8 +980,14 @@ def pn_event_delivery(event):
def pn_event_transport(event):
return wrap(event.getTransport(), pn_transport_wrapper)
+def pn_event_class(event):
+ return event.getClass()
+
def pn_event_type(event):
return event.getType()
def pn_event_type_name(etype):
return str(etype)
+
+def pn_event_category(event):
+ return event.getCategory()
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/proton-j/src/test/java/org/apache/qpid/proton/messenger/impl/AddressTest.java
----------------------------------------------------------------------
diff --git a/proton-j/src/test/java/org/apache/qpid/proton/messenger/impl/AddressTest.java b/proton-j/src/test/java/org/apache/qpid/proton/messenger/impl/AddressTest.java
index 3efc683..c0d2d92 100644
--- a/proton-j/src/test/java/org/apache/qpid/proton/messenger/impl/AddressTest.java
+++ b/proton-j/src/test/java/org/apache/qpid/proton/messenger/impl/AddressTest.java
@@ -24,7 +24,20 @@ public class AddressTest {
testParse("user@host", null, "user", null, "host", null, null);
testParse("user:1243^&^:pw@host:423", null, "user", "1243^&^:pw", "host", "423", null);
testParse("user:1243^&^:pw@host:423/Foo.bar:90087", null, "user", "1243^&^:pw", "host", "423", "Foo.bar:90087");
- testParse("user:1243^&^:pw@host:423/Foo.bar:90087@somewhere", null, "user", "1243^&^:pw", "host", "423", "Foo.bar:90087@somewhere");
+ testParse("user:1243^&^:pw@host:423/Foo.bar:90087@somewhere", null, "user", "1243^&^:pw", "host", "423", "Foo.bar:90087@somewhere");
+ testParse("[::1]", null, null, null, "::1", null, null);
+ testParse("[::1]:amqp", null, null, null, "::1", "amqp", null);
+ testParse("user@[::1]", null, "user", null, "::1", null, null);
+ testParse("user@[::1]:amqp", null, "user", null, "::1", "amqp", null);
+ testParse("user:1243^&^:pw@[::1]:amqp", null, "user", "1243^&^:pw", "::1", "amqp", null);
+ testParse("user:1243^&^:pw@[::1]:amqp/Foo.bar:90087", null, "user", "1243^&^:pw", "::1", "amqp", "Foo.bar:90087");
+ testParse("user:1243^&^:pw@[::1:amqp/Foo.bar:90087", null, "user", "1243^&^:pw", "[", ":1:amqp", "Foo.bar:90087");
+ testParse("user:1243^&^:pw@::1]:amqp/Foo.bar:90087", null, "user", "1243^&^:pw", "", ":1]:amqp", "Foo.bar:90087");
+ testParse("amqp://user@[::1]", "amqp", "user", null, "::1", null, null);
+ testParse("amqp://user@[::1]:amqp", "amqp", "user", null, "::1", "amqp", null);
+ testParse("amqp://user@[1234:52:0:1260:f2de:f1ff:fe59:8f87]:amqp", "amqp", "user", null, "1234:52:0:1260:f2de:f1ff:fe59:8f87", "amqp", null);
+ testParse("amqp://user:1243^&^:pw@[::1]:amqp", "amqp", "user", "1243^&^:pw", "::1", "amqp", null);
+ testParse("amqp://user:1243^&^:pw@[::1]:amqp/Foo.bar:90087", "amqp", "user", "1243^&^:pw", "::1", "amqp", "Foo.bar:90087");
testParse("amqp://host", "amqp", null, null, "host", null, null);
testParse("amqp://user@host", "amqp", "user", null, "host", null, null);
testParse("amqp://user@host/path:%", "amqp", "user", null, "host", null, "path:%");
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/tests/python/proton_tests/common.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/common.py b/tests/python/proton_tests/common.py
index 82781fb..d597c2f 100644
--- a/tests/python/proton_tests/common.py
+++ b/tests/python/proton_tests/common.py
@@ -333,6 +333,7 @@ class MessengerApp(object):
self.certificate = None
self.privatekey = None
self.password = None
+ self._output = None
def start(self, verbose=False):
""" Begin executing the test """
@@ -363,8 +364,15 @@ class MessengerApp(object):
def stdout(self):
#self._process.communicate()[0]
+ if not self._output or not self._output[0]:
+ return "*** NO STDOUT ***"
return self._output[0]
+ def stderr(self):
+ if not self._output or not self._output[1]:
+ return "*** NO STDERR ***"
+ return self._output[1]
+
def cmdline(self):
if not self._cmdline:
self._build_command()
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/tests/python/proton_tests/engine.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/engine.py b/tests/python/proton_tests/engine.py
index 1797b14..243e5bc 100644
--- a/tests/python/proton_tests/engine.py
+++ b/tests/python/proton_tests/engine.py
@@ -2102,7 +2102,7 @@ class EventTest(Test):
self.expect(coll)
c2.open()
self.pump()
- self.expect(coll, Event.CONNECTION_STATE)
+ self.expect(coll, Event.CONNECTION_REMOTE_STATE)
self.pump()
self.expect(coll)
@@ -2113,7 +2113,21 @@ class EventTest(Test):
self.expect(coll)
self.pump()
- self.expect(coll, Event.SESSION_STATE, Event.LINK_STATE)
+ self.expect(coll, Event.SESSION_REMOTE_STATE, Event.LINK_REMOTE_STATE)
+
+ c1.open()
+ ssn2 = c1.session()
+ ssn2.open()
+ rcv = ssn2.receiver("receiver")
+ rcv.open()
+ self.pump()
+ self.expect(coll,
+ Event.CONNECTION_LOCAL_STATE,
+ Event.TRANSPORT,
+ Event.SESSION_LOCAL_STATE,
+ Event.TRANSPORT,
+ Event.LINK_LOCAL_STATE,
+ Event.TRANSPORT)
def testFlowEvents(self):
snd, rcv = self.link("test-link")
@@ -2122,7 +2136,7 @@ class EventTest(Test):
rcv.open()
rcv.flow(10)
self.pump()
- self.expect(coll, Event.LINK_STATE, Event.LINK_FLOW)
+ self.expect(coll, Event.LINK_REMOTE_STATE, Event.LINK_FLOW)
rcv.flow(10)
self.pump()
self.expect(coll, Event.LINK_FLOW)
@@ -2135,7 +2149,7 @@ class EventTest(Test):
rcv.open()
rcv.flow(10)
self.pump()
- self.expect(coll, Event.TRANSPORT, Event.TRANSPORT)
+ self.expect(coll, Event.LINK_LOCAL_STATE, Event.TRANSPORT, Event.TRANSPORT)
snd.delivery("delivery")
snd.send("Hello World!")
snd.advance()
@@ -2143,7 +2157,7 @@ class EventTest(Test):
self.expect(coll)
snd.open()
self.pump()
- self.expect(coll, Event.LINK_STATE, Event.DELIVERY)
+ self.expect(coll, Event.LINK_REMOTE_STATE, Event.DELIVERY)
def testDeliveryEventsDisp(self):
snd, rcv, coll = self.testFlowEvents()
@@ -2151,7 +2165,11 @@ class EventTest(Test):
dlv = snd.delivery("delivery")
snd.send("Hello World!")
assert snd.advance()
- self.expect(coll, Event.TRANSPORT, Event.TRANSPORT, Event.TRANSPORT)
+ self.expect(coll,
+ Event.LINK_LOCAL_STATE,
+ Event.TRANSPORT,
+ Event.TRANSPORT,
+ Event.TRANSPORT)
self.pump()
self.expect(coll)
rdlv = rcv.current
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/tests/python/proton_tests/soak.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/soak.py b/tests/python/proton_tests/soak.py
index f6a62da..94ce488 100644
--- a/tests/python/proton_tests/soak.py
+++ b/tests/python/proton_tests/soak.py
@@ -44,31 +44,31 @@ class AppTests(Test):
@property
def iterations(self):
- return int(self.default("iterations", 2, fast=1, valgrind=1))
+ return int(self.default("iterations", 2, fast=1, valgrind=2))
@property
def send_count(self):
- return int(self.default("send_count", 17, fast=1, valgrind=1))
+ return int(self.default("send_count", 17, fast=1, valgrind=2))
@property
def target_count(self):
- return int(self.default("target_count", 5, fast=1, valgrind=1))
+ return int(self.default("target_count", 5, fast=1, valgrind=2))
@property
def send_batch(self):
- return int(self.default("send_batch", 7, fast=1, valgrind=1))
+ return int(self.default("send_batch", 7, fast=1, valgrind=2))
@property
def forward_count(self):
- return int(self.default("forward_count", 5, fast=1, valgrind=1))
+ return int(self.default("forward_count", 5, fast=1, valgrind=2))
@property
def port_count(self):
- return int(self.default("port_count", 3, fast=1, valgrind=1))
+ return int(self.default("port_count", 3, fast=1, valgrind=2))
@property
def sender_count(self):
- return int(self.default("sender_count", 3, fast=1, valgrind=1))
+ return int(self.default("sender_count", 3, fast=1, valgrind=2))
def valgrind_test(self):
self.is_valgrind = True
@@ -94,13 +94,21 @@ class AppTests(Test):
S.wait()
#print("SENDER OUTPUT:")
#print( S.stdout() )
- assert S.status() == 0, "Command '%s' failed" % str(S.cmdline())
+ assert S.status() == 0, ("Command '%s' failed status=%d: '%s' '%s'"
+ % (str(S.cmdline()),
+ S.status(),
+ S.stdout(),
+ S.stderr()))
for R in self.receivers:
R.wait()
#print("RECEIVER OUTPUT")
#print( R.stdout() )
- assert R.status() == 0, "Command '%s' failed" % str(R.cmdline())
+ assert R.status() == 0, ("Command '%s' failed status=%d: '%s' '%s'"
+ % (str(R.cmdline()),
+ R.status(),
+ R.stdout(),
+ R.stderr()))
#
# Traffic passing tests based on the Messenger apps
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/tests/python/proton_tests/ssl.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/ssl.py b/tests/python/proton_tests/ssl.py
index db19e6f..ed2e25d 100644
--- a/tests/python/proton_tests/ssl.py
+++ b/tests/python/proton_tests/ssl.py
@@ -18,7 +18,10 @@
#
import os, common
+import random
+import string
import subprocess
+
from proton import *
from common import Skipped, pump
@@ -877,7 +880,9 @@ class MessengerSSLTests(common.Test):
msg = Message()
msg.address = "amqps://127.0.0.1:12345"
- msg.body = "Hello World!"
+ # make sure a large, uncompressible message body works!
+ msg.body = "".join(random.choice(string.ascii_letters)
+ for x in range(10099))
trk = self.client.put(msg)
self.client.send()
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/33c895ec/tools/cmake/Modules/FindJava.cmake
----------------------------------------------------------------------
diff --git a/tools/cmake/Modules/FindJava.cmake b/tools/cmake/Modules/FindJava.cmake
index dae56bc..1664fe1 100644
--- a/tools/cmake/Modules/FindJava.cmake
+++ b/tools/cmake/Modules/FindJava.cmake
@@ -107,7 +107,7 @@ if(Java_JAVA_EXECUTABLE)
# 2. OpenJDK 1.6
# 3. GCJ 1.5
# 4. Kaffe 1.4.2
- if(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
+ if(var MATCHES "(java|openjdk) version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
string( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\".*"
"\\1" Java_VERSION_STRING "${var}" )
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org