Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 662585 Details for
Bug 886656
HA backup broker does not properly increment the alternate exchange user count
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to add a unit test reproducer
test_alt_exchange_users.patch (text/plain), 2.81 KB, created by
Jason Dillaman
on 2012-12-12 19:55:07 UTC
(
hide
)
Description:
Patch to add a unit test reproducer
Filename:
MIME Type:
Creator:
Jason Dillaman
Created:
2012-12-12 19:55:07 UTC
Size:
2.81 KB
patch
obsolete
>diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py >index 24a6eea..8b86e49 100755 >--- a/qpid/cpp/src/tests/ha_tests.py >+++ b/qpid/cpp/src/tests/ha_tests.py >@@ -20,7 +20,8 @@ > > import os, signal, sys, time, imp, re, subprocess, glob, random, logging, shutil, math, unittest, random > import traceback >-from qpid.messaging import Message, NotFound, ConnectionError, ReceiverError, Connection, Timeout, Disposition, REJECTED, Empty >+from qpid import * >+from qpid.messaging import Message, NotFound, ConnectionError, ReceiverError, SessionError, Connection, Timeout, Disposition, REJECTED, Empty > from qpid.datatypes import uuid4 > from brokertest import * > from ha_test import * >@@ -849,6 +850,41 @@ acl deny all all > cluster[2].wait_address("xx") > self.assertEqual(cluster[2].agent().getExchange("xx").values["bindingCount"], 0) > >+ def test_alt_exchange_users(self): >+ """Ensure that the alternate exchange count is properly replicated""" >+ primary = HaBroker(self, name="primary", expect=EXPECT_EXIT_FAIL) >+ primary.promote() >+ backup = HaBroker(self, name="backup", brokers_url=primary.host_port()) >+ ps = primary.connect().session() >+ ps.sender("ex1;{create:always,node:{type:topic,x-declare:{arguments:{'qpid.replicate':all}, type:'fanout'}}}") >+ ps.sender("ex2;{create:always,node:{type:topic,x-declare:{arguments:{'qpid.replicate':all}, type:'fanout', alternate-exchange:'ex1'}}}") >+ ps.sender("q;{create:always,node:{type:queue,x-declare:{arguments:{'qpid.replicate':all}, alternate-exchange:'ex1'}, x-bindings:[{exchange:'ex1',queue:'q',key:''}]}}") >+ backup.wait_backup("ex1") >+ backup.wait_backup("ex2") >+ backup.wait_backup("q") >+ >+ primary.kill() >+ assert retry(lambda: not is_running(primary.pid)) # Wait for primary to die >+ backup.promote() >+ >+ # should fail since ex2 and q use ex1 as alt >+ try: >+ backup.connect_admin().session().sender("ex1;{delete:always,node:{type:topic}}").close() >+ self.fail("Expected not-allowed exception") >+ except SessionError: pass >+ >+ # should fail since q uses ex1 as alt >+ backup.connect_admin().session().sender("ex2;{delete:always,node:{type:topic}}").close() >+ try: >+ backup.connect_admin().session().sender("ex1;{delete:always,node:{type:topic}}").close() >+ self.fail("Expected not-allowed exception") >+ except SessionError: pass >+ >+ # should succeed >+ backup.connect_admin().session().sender("q;{delete:always}").close() >+ backup.connect_admin().session().sender("ex1;{delete:always,node:{type:topic}}").close() >+ >+ > def fairshare(msgs, limit, levels): > """ > Generator to return prioritised messages in expected order for a given fairshare limit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 886656
: 662585