qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From philharveyonl...@apache.org
Subject svn commit: r1485619 - in /qpid/proton/trunk: proton-c/bindings/python/proton.py proton-j/proton-api/src/main/resources/proton.py tests/python/proton_tests/messenger.py tests/python/proton_tests/ssl.py
Date Thu, 23 May 2013 09:05:17 GMT
Author: philharveyonline
Date: Thu May 23 09:05:16 2013
New Revision: 1485619

URL: http://svn.apache.org/r1485619
Log:
PROTON-315: now only skipping MessengerTest.testIncomingQueueBiggerThanWindow if using proton-j.
This required me to distinguish the language of the API from the language of the implementation
(for example proton-jni has a Java interface but a C implementation).

Modified:
    qpid/proton/trunk/proton-c/bindings/python/proton.py
    qpid/proton/trunk/proton-j/proton-api/src/main/resources/proton.py
    qpid/proton/trunk/tests/python/proton_tests/messenger.py
    qpid/proton/trunk/tests/python/proton_tests/ssl.py

Modified: qpid/proton/trunk/proton-c/bindings/python/proton.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/python/proton.py?rev=1485619&r1=1485618&r2=1485619&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/proton.py (original)
+++ qpid/proton/trunk/proton-c/bindings/python/proton.py Thu May 23 09:05:16 2013
@@ -88,7 +88,8 @@ try:
 except NameError:
   bytes = str
 
-LANGUAGE = "C"
+API_LANGUAGE = "C"
+IMPLEMENTATION_LANGUAGE = "C"
 
 class Constant(object):
 
@@ -2669,7 +2670,8 @@ class Driver(object):
     return wrap_connector(pn_driver_connector(self._driver))
 
 __all__ = [
-           "LANGUAGE",
+           "API_LANGUAGE",
+           "IMPLEMENTATION_LANGUAGE",
            "PN_SESSION_WINDOW",
            "ACCEPTED",
            "AUTOMATIC",

Modified: qpid/proton/trunk/proton-j/proton-api/src/main/resources/proton.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-j/proton-api/src/main/resources/proton.py?rev=1485619&r1=1485618&r2=1485619&view=diff
==============================================================================
--- qpid/proton/trunk/proton-j/proton-api/src/main/resources/proton.py (original)
+++ qpid/proton/trunk/proton-j/proton-api/src/main/resources/proton.py Thu May 23 09:05:16
2013
@@ -43,7 +43,6 @@ from java.util.concurrent import Timeout
 from java.nio import ByteBuffer
 from java.lang import Character as JCharacter, String as JString, Integer as JInteger
 
-LANGUAGE = "Java"
 
 
 class Constant(object):
@@ -79,6 +78,10 @@ messageFactory = protonFactoryLoader.loa
 messengerFactory = protonFactoryLoader.loadFactory(MessengerFactory)
 dataFactory = protonFactoryLoader.loadFactory(DataFactory)
 
+API_LANGUAGE = "Java"
+IMPLEMENTATION_LANGUAGE = "C"
+if engineFactory.getImplementationType().name() == "PROTON_J":
+  IMPLEMENTATION_LANGUAGE = "Java"
 
 
 class Endpoint(object):
@@ -1453,7 +1456,8 @@ class Listener(object):
 __all__ = [
            "ACCEPTED",
            "Array",
-           "LANGUAGE",
+           "API_LANGUAGE",
+           "IMPLEMENTATION_LANGUAGE",
            "MANUAL",
            "PENDING",
            "REJECTED",

Modified: qpid/proton/trunk/tests/python/proton_tests/messenger.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tests/python/proton_tests/messenger.py?rev=1485619&r1=1485618&r2=1485619&view=diff
==============================================================================
--- qpid/proton/trunk/tests/python/proton_tests/messenger.py (original)
+++ qpid/proton/trunk/tests/python/proton_tests/messenger.py Thu May 23 09:05:16 2013
@@ -21,6 +21,7 @@ import os, common, sys, traceback
 from proton import *
 from threading import Thread, Event
 from time import sleep, time
+from common import Skipped
 
 class Test(common.Test):
 
@@ -284,8 +285,11 @@ class MessengerTest(Test):
     for t in trackers:
       assert self.client.status(t) is ACCEPTED, (t, self.client.status(t))
 
-  # see https://issues.apache.org/jira/browse/PROTON-315
-  def removedInProton315_testIncomingQueueBiggerThanWindow(self):
+  def testIncomingQueueBiggerThanWindow(self):
+    if IMPLEMENTATION_LANGUAGE == "Java":
+      # Currently fails with proton-j. See https://issues.apache.org/jira/browse/PROTON-315
+      raise Skipped
+
     self.server.outgoing_window = 10
     self.client.incoming_window = 10
     self.start()

Modified: qpid/proton/trunk/tests/python/proton_tests/ssl.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tests/python/proton_tests/ssl.py?rev=1485619&r1=1485618&r2=1485619&view=diff
==============================================================================
--- qpid/proton/trunk/tests/python/proton_tests/ssl.py (original)
+++ qpid/proton/trunk/tests/python/proton_tests/ssl.py Thu May 23 09:05:16 2013
@@ -458,7 +458,7 @@ class SslTest(common.Test):
         server.connection.open()
         self._pump( client, server )
         assert server.ssl.protocol_name() is not None
-        if(LANGUAGE=="C"):
+        if(API_LANGUAGE=="C"):
             assert client.ssl.resume_status() == SSL.RESUME_REUSED
         else:
             # Java gives no way to check whether a previous session has been resumed
@@ -481,7 +481,7 @@ class SslTest(common.Test):
         server.connection.open()
         self._pump( client, server )
         assert server.ssl.protocol_name() is not None
-        if(LANGUAGE=="C"):
+        if(API_LANGUAGE=="C"):
             assert client.ssl.resume_status() == SSL.RESUME_NEW
 
         client.connection.close()



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


Mime
View raw message