You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Steve Huston (JIRA)" <qp...@incubator.apache.org> on 2010/04/09 16:57:50 UTC

[jira] Created: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Changes to brokertest.py to better manage Windows brokers
---------------------------------------------------------

                 Key: QPID-2492
                 URL: https://issues.apache.org/jira/browse/QPID-2492
             Project: Qpid
          Issue Type: Improvement
          Components: Python Test Suite
    Affects Versions: 0.7
            Reporter: Steve Huston


I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858544#action_12858544 ] 

Alan Conway commented on QPID-2492:
-----------------------------------

I've got 2 concerns with this patch:

1. I deliberately did not use the subprocess module so this could would run on python 2,3. Is it essential to use subprocess in order for this to work on windows? 

2. Why did you comment out draining of stderr? We need to capture stderr output from failed processes to diagnose test failures.

> Changes to brokertest.py to better manage Windows brokers
> ---------------------------------------------------------
>
>                 Key: QPID-2492
>                 URL: https://issues.apache.org/jira/browse/QPID-2492
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Python Test Suite
>    Affects Versions: 0.7
>            Reporter: Steve Huston
>         Attachments: brokertest.diff
>
>
> I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858558#action_12858558 ] 

Steve Huston commented on QPID-2492:
------------------------------------

The popen2.Popen3 class is not available on Windows. It may be possible to use the popen2.open3 function instead of Popen3. I'll check that out.

> Changes to brokertest.py to better manage Windows brokers
> ---------------------------------------------------------
>
>                 Key: QPID-2492
>                 URL: https://issues.apache.org/jira/browse/QPID-2492
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Python Test Suite
>    Affects Versions: 0.7
>            Reporter: Steve Huston
>         Attachments: brokertest.diff
>
>
> I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862844#action_12862844 ] 

Steve Huston commented on QPID-2492:
------------------------------------

This has to use subprocess on Windows; I can move the Popen class to its own file and implement it with subprocess and leave the original popen one parallel to it. Is there a way I can tell the Python version at run time and pick one implementation over the other? Or would you rather this be left as a Windows vs. Linux thing? I'd rather not divide by OS to avoid diverging capabilities that aren't portable up to the test using it.

> Changes to brokertest.py to better manage Windows brokers
> ---------------------------------------------------------
>
>                 Key: QPID-2492
>                 URL: https://issues.apache.org/jira/browse/QPID-2492
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Python Test Suite
>    Affects Versions: 0.7
>            Reporter: Steve Huston
>         Attachments: brokertest.diff
>
>
> I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858599#action_12858599 ] 

Steve Huston commented on QPID-2492:
------------------------------------

The main hitch with using popen2 is access to the pid, which is required for the process-killing capability, which is necessary. Popen3 class provides it but Popen3/4 are not available on Windows.

So, Windows needs to use subprocess instead of popen2. I'll try to develop a patch that uses subprocess only on Windows and popen2 otherwise. How does that sound?


> Changes to brokertest.py to better manage Windows brokers
> ---------------------------------------------------------
>
>                 Key: QPID-2492
>                 URL: https://issues.apache.org/jira/browse/QPID-2492
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Python Test Suite
>    Affects Versions: 0.7
>            Reporter: Steve Huston
>         Attachments: brokertest.diff
>
>
> I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Huston updated QPID-2492:
-------------------------------

    Attachment: brokertest.diff

> Changes to brokertest.py to better manage Windows brokers
> ---------------------------------------------------------
>
>                 Key: QPID-2492
>                 URL: https://issues.apache.org/jira/browse/QPID-2492
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Python Test Suite
>    Affects Versions: 0.7
>            Reporter: Steve Huston
>         Attachments: brokertest.diff
>
>
> I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-2492) Changes to brokertest.py to better manage Windows brokers

Posted by "Steve Huston (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858550#action_12858550 ] 

Steve Huston commented on QPID-2492:
------------------------------------

Thanks for the review, Alan.
1. I'll double check if subprocess is required.
2. The subprocess init has an option to pipe stderr to stdout without creating a separate stream and reading it.

> Changes to brokertest.py to better manage Windows brokers
> ---------------------------------------------------------
>
>                 Key: QPID-2492
>                 URL: https://issues.apache.org/jira/browse/QPID-2492
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Python Test Suite
>    Affects Versions: 0.7
>            Reporter: Steve Huston
>         Attachments: brokertest.diff
>
>
> I've been developing tests for the persistence/store functionality using python/qpid/brokertest.py and I've made some local changes to get this to work well on Windows. I'm a Python beginner, and there may be better ways to do what I've done. Could someone please review the patch here and let me know any suggestions?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org