rhmessaging commits: r1659 - store/trunk/cpp/tests/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-02-07 14:49:50 -0500 (Thu, 07 Feb 2008)
New Revision: 1659
Modified:
store/trunk/cpp/tests/jrnl/jtest.cpp
store/trunk/cpp/tests/jrnl/jtest.hpp
store/trunk/cpp/tests/jrnl/msg_consumer.cpp
store/trunk/cpp/tests/jrnl/msg_consumer.hpp
Log:
Minor updates for soon-to-be-removed manual tests, not part of current testing strategy.
Modified: store/trunk/cpp/tests/jrnl/jtest.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtest.cpp 2008-02-07 18:41:03 UTC (rev 1658)
+++ store/trunk/cpp/tests/jrnl/jtest.cpp 2008-02-07 19:49:50 UTC (rev 1659)
@@ -149,7 +149,7 @@
#ifndef RHM_WRONLY
_mc.initialize(c_args);
#endif
- _jc.initialize(&mp_aio_cb);
+ _jc.initialize(&mc_aio_cb, &mp_aio_cb);
for (u_int32_t i=0; i<p_args->_num_msgs; i++)
{
@@ -282,7 +282,14 @@
JFSIZE_SBLKS);
// static method
+
void
+jtest::mc_aio_cb(rhm::journal::jcntl* jc, std::vector<u_int16_t>& pil)
+{
+ jtest::_mc.aio_callback(jc, pil);
+}
+
+void
jtest::mp_aio_cb(rhm::journal::jcntl* jc, std::vector<rhm::journal::data_tok*>& dtokl)
{
jtest::_mp.aio_callback(jc, dtokl);
Modified: store/trunk/cpp/tests/jrnl/jtest.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtest.hpp 2008-02-07 18:41:03 UTC (rev 1658)
+++ store/trunk/cpp/tests/jrnl/jtest.hpp 2008-02-07 19:49:50 UTC (rev 1659)
@@ -106,6 +106,7 @@
// AIO callback functions
static void mp_aio_cb(rhm::journal::jcntl* jc, std::vector<rhm::journal::data_tok*>& dtokl);
+ static void mc_aio_cb(rhm::journal::jcntl* jc, std::vector<u_int16_t>& pil);
};
#endif
Modified: store/trunk/cpp/tests/jrnl/msg_consumer.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/msg_consumer.cpp 2008-02-07 18:41:03 UTC (rev 1658)
+++ store/trunk/cpp/tests/jrnl/msg_consumer.cpp 2008-02-07 19:49:50 UTC (rev 1659)
@@ -221,10 +221,8 @@
}
void
-msg_consumer::aio_callback(rhm::journal::jcntl* /*jc*/, u_int32_t num_dtoks)
-{
- std::cout << "msg_consumer::aio_cb(" << num_dtoks << ")" << std::endl;
-}
+msg_consumer::aio_callback(rhm::journal::jcntl* /*jc*/, std::vector<u_int16_t>& /*pil*/)
+{}
void
msg_consumer::interrupt()
Modified: store/trunk/cpp/tests/jrnl/msg_consumer.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/msg_consumer.hpp 2008-02-07 18:41:03 UTC (rev 1658)
+++ store/trunk/cpp/tests/jrnl/msg_consumer.hpp 2008-02-07 19:49:50 UTC (rev 1659)
@@ -86,7 +86,7 @@
const size_t max_xid_size, const bool transient_expected, const bool external_expected)
throw (rhm::journal::jexception);
u_int32_t consume(_c_args* args) throw (rhm::journal::jexception);
- void aio_callback(rhm::journal::jcntl* jc, u_int32_t num_dtoks);
+ void aio_callback(rhm::journal::jcntl* jc, std::vector<u_int16_t>& pil);
const inline u_int64_t get_tot_dblks() const { return _tot_dblks; }
const inline u_int64_t get_tot_dsize() const { return _tot_dsize; }
18 years, 2 months
rhmessaging commits: r1658 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-02-07 13:41:03 -0500 (Thu, 07 Feb 2008)
New Revision: 1658
Modified:
mgmt/cumin/python/cumin/model.py
Log:
Use python 2.4 compatible try block syntax.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2008-02-07 18:05:09 UTC (rev 1657)
+++ mgmt/cumin/python/cumin/model.py 2008-02-07 18:41:03 UTC (rev 1658)
@@ -93,9 +93,10 @@
#invoc.prt()
try:
- self.do_invoke(object, args, completion)
- except Exception, e:
- invoc.exception = e;
+ try:
+ self.do_invoke(object, args, completion)
+ except Exception, e:
+ invoc.exception = e;
finally:
self.model.invocations.add(invoc)
18 years, 2 months
rhmessaging commits: r1657 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-02-07 13:05:09 -0500 (Thu, 07 Feb 2008)
New Revision: 1657
Modified:
mgmt/cumin/python/cumin/action.py
Log:
Some cosmetic changes to the jobs ui.
Modified: mgmt/cumin/python/cumin/action.py
===================================================================
--- mgmt/cumin/python/cumin/action.py 2008-02-07 15:01:51 UTC (rev 1656)
+++ mgmt/cumin/python/cumin/action.py 2008-02-07 18:05:09 UTC (rev 1657)
@@ -33,17 +33,32 @@
def render_content(self, session, item):
delta = secs(datetime.now()) - secs(item.when)
- return "%s ago" % fmt_duration(delta)
+ duration = fmt_duration(delta)
+ if duration:
+ return "%s ago" % duration
+ else:
+ ""
class StatusColumn(ItemTableColumn):
def get_title(self, session, object):
return "Status"
def render_content(self, session, item):
- return item.status
+ if item.status == "pending":
+ text = "Pending"
+ elif item.status == "OK":
+ text = "Completed"
+ else:
+ text = "Failed"
+ if item.status.exception:
+ text = text + ": " + \
+ item.status.exception.__class__.__name__
+
+ return text
+
def do_get_items(self, session, object):
- return sorted_by(self.app.model.invocations, "when")
+ return reversed(sorted_by(self.app.model.invocations, "when"))
class ActionPage(Page):
def __init__(self, app, name):
18 years, 2 months
rhmessaging commits: r1656 - in store/trunk/cpp: tests and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2008-02-07 10:01:51 -0500 (Thu, 07 Feb 2008)
New Revision: 1656
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/StorePlugin.cpp
store/trunk/cpp/tests/jrnl/jtt/Makefile.am
store/trunk/cpp/tests/system_test.sh
Log:
Added support for qpidd --data-dir function. Made async store the default. Fixed F8 compile problem in jtt unit tests
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2008-02-07 15:01:51 UTC (rev 1656)
@@ -1361,15 +1361,14 @@
BdbMessageStore::Options::Options(const std::string& name) :
qpid::Options(name),
- storeDir("/var"),
- storeAsync(false),
+ storeAsync(true),
storeForce(false),
numJrnlFiles(8),
jrnlFsizePgs(24)
{
addOptions()
("store-directory", qpid::optValue(storeDir,"DIR"),
- "Store directory location for persistence.")
+ "Store directory location for persistence (overrides --data-dir)")
("store-async", qpid::optValue(storeAsync,"yes|no"),
"Use async persistence storage - if store supports it, enables AIO O_DIRECT.")
("store-force", qpid::optValue(storeForce,"yes|no"),
Modified: store/trunk/cpp/lib/StorePlugin.cpp
===================================================================
--- store/trunk/cpp/lib/StorePlugin.cpp 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/lib/StorePlugin.cpp 2008-02-07 15:01:51 UTC (rev 1656)
@@ -24,6 +24,7 @@
#include "qpid/broker/Broker.h"
#include "qpid/Plugin.h"
#include "qpid/Options.h"
+#include "qpid/DataDir.h"
#include "BdbMessageStore.h"
@@ -42,7 +43,16 @@
{
Broker* broker = dynamic_cast<Broker*>(&target);
MessageStore *store = new rhm::bdbstore::BdbMessageStore ();
+ DataDir& dataDir = broker->getDataDir ();
+ if (options.storeDir.empty ())
+ {
+ if (!dataDir.isEnabled ())
+ throw Exception ("If --data-dir is blank, --store-directory must be set");
+
+ options.storeDir = dataDir.getPath ();
+ }
+
if (!store->init (&options))
{
throw Exception("Existing Journal in different mode, backup/move existing data "
Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-07 15:01:51 UTC (rev 1656)
@@ -24,7 +24,7 @@
LIBOBJDIR = ${LIBDIR}/.libs
JRNLDIR = ${LIBDIR}/jrnl
-AM_CXXFLAGS = -I${LIBDIR} -Wall -Werror -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -pedantic -pthread
+AM_CXXFLAGS = -I${LIBDIR} -Wall -Werror -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -pedantic -pthread -DBOOST_TEST_DYN_LINK
TESTS = \
_ut_data_src \
Modified: store/trunk/cpp/tests/system_test.sh
===================================================================
--- store/trunk/cpp/tests/system_test.sh 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/tests/system_test.sh 2008-02-07 15:01:51 UTC (rev 1656)
@@ -64,18 +64,18 @@
while ((sync <= 1)); do
echo
if ((sync == 1)); then
- JRNLFLAGS="--store-directory ${WORKING_DIR} --store-async yes --store-force yes"
+ JRNLFLAGS="--store-directory ${WORKING_DIR} --store-force yes"
mode='jrnl'
echo 'Journal (AIO) persistence...'
else
- JRNLFLAGS="--store-directory ${WORKING_DIR} --store-force yes"
+ JRNLFLAGS="--store-directory ${WORKING_DIR} --store-async no --store-force yes"
mode='bdb'
echo 'BDB persistence...'
fi
for p in `seq 1 6`; do
log="$abs_srcdir/vg-log.$mode.$p"
- #echo "$vg $QPIDD --load-module $LIBBDBSTORE $JRNLFLAGS"
- $vg $QPIDD -m 0 --load-module $LIBBDBSTORE $JRNLFLAGS >> "$abs_srcdir/qpid.log" 2> $log & pid=$!
+ #echo "$vg $QPIDD -m 0 --data dir "" --load-module $LIBBDBSTORE $JRNLFLAGS"
+ $vg $QPIDD -m 0 --data-dir "" --load-module $LIBBDBSTORE $JRNLFLAGS >> "$abs_srcdir/qpid.log" 2> $log & pid=$!
sleep 5
echo phase $p...
18 years, 2 months
rhmessaging commits: r1655 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-02-07 08:22:19 -0500 (Thu, 07 Feb 2008)
New Revision: 1655
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/page.py
Log:
Makes all the existing actions show up in the jobs ui.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2008-02-07 13:06:07 UTC (rev 1654)
+++ mgmt/cumin/python/cumin/broker.py 2008-02-07 13:22:19 UTC (rev 1655)
@@ -464,7 +464,7 @@
def render_add_broker_href(self, session, model):
branch = session.branch()
- self.frame().show_broker_add(branch)
+ self.frame().show_brokers_add(branch)
return branch.marshal()
def render_clear_filters_href(self, session, model):
@@ -612,7 +612,7 @@
def render_content(self, session, model):
return "More Entries"
-class BrokerAdd(BrokerForm):
+class BrokerSetAdd(BrokerForm):
def get_title(self, session, object):
return "Register New Brokers"
@@ -622,6 +622,8 @@
self.page().set_redirect_url(session, branch.marshal())
def process_submit(self, session, model):
+ action = self.app.model.broker_registration.add
+
addrs = self.addrs.get(session)
names = self.names.get(session)
groups = self.groups.get(session)
@@ -630,24 +632,30 @@
addr = addrs[i]
if addr:
- reg = BrokerRegistration()
+ name = names[i]
elems = addr.split(":")
if len(elems) > 1:
- reg.host, reg.port = elems[0], int(elems[1])
+ host, port = elems[0], int(elems[1])
else:
- reg.host, reg.port = elems[0], 5672
+ host, port = elems[0], 5672
- reg.name = names[i]
+ group = groups[i]
- if groups[i]:
- reg.addBrokerGroup(groups[i])
+ args = {
+ "name": name,
+ "host": host,
+ "port": port
+ }
- reg.syncUpdate()
+ reg = BrokerRegistration()
- self.app.broker_connect_thread.prompt()
+ if group:
+ reg.addBrokerGroup(group)
+ action.invoke(reg, args);
+
self.process_cancel(session, model)
class BrokerRemove(CuminConfirmForm):
@@ -664,7 +672,7 @@
action.invoke(broker)
branch = session.branch()
- self.page().show_main(branch)
+ self.page().show_main(branch).show_view(branch)
self.page().set_redirect_url(session, branch.marshal())
def render_submit_content(self, session, broker):
@@ -685,12 +693,9 @@
self.page().set_redirect_url(session, branch.marshal())
def process_item(self, session, id):
- try:
- broker = BrokerRegistration.get(id)
- broker.destroySelf()
- except Exception, e:
- # In an extra ui step, note any errors that arose
- print e
+ action = self.app.model.broker_registration.remove
+ # XXX need to handle object not found case
+ action.invoke(BrokerRegistration.get(id))
def render_item_content(self, session, id):
return "Unregister Broker '%s'" % BrokerRegistration.get(id).name
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2008-02-07 13:06:07 UTC (rev 1654)
+++ mgmt/cumin/python/cumin/model.py 2008-02-07 13:22:19 UTC (rev 1655)
@@ -92,10 +92,13 @@
invoc.args = args
#invoc.prt()
- self.do_invoke(object, args, completion)
+ try:
+ self.do_invoke(object, args, completion)
+ except Exception, e:
+ invoc.exception = e;
+ finally:
+ self.model.invocations.add(invoc)
- self.model.invocations.add(invoc)
-
return invoc
def do_invoke(self, object, args, completion):
@@ -108,6 +111,7 @@
self.when = datetime.now()
self.status = "pending"
self.args = None
+ self.exception = None
def get_description(self, session):
verb = self.action.get_title(session)
@@ -294,9 +298,14 @@
def do_invoke(self, object, args, completion):
try:
- object = self.cumin_class.mint_class()
+ if not object:
+ object = self.cumin_class.mint_class()
+
object.set(**args)
object.syncUpdate()
+
+ self.model.app.broker_connect_thread.prompt()
+
completion("OK")
except Exception, e:
completion(e.message or "failed")
@@ -640,7 +649,6 @@
self.Close(self, "close")
self.Detach(self, "detach")
- # XXX de studly these
self.ResetLifespan(self, "resetLifespan")
self.SolicitAck(self, "solicitAck")
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2008-02-07 13:06:07 UTC (rev 1654)
+++ mgmt/cumin/python/cumin/page.py 2008-02-07 13:22:19 UTC (rev 1655)
@@ -74,9 +74,8 @@
self.__broker = BrokerFrame(app, "broker")
self.add_mode(self.__broker)
- # XXX rename to BrokerSetAdd
- self.__broker_add = BrokerAdd(app, "brokeradd")
- self.add_mode(self.__broker_add)
+ self.__brokers_add = BrokerSetAdd(app, "brokersadd")
+ self.add_mode(self.__brokers_add)
self.__brokers_remove = BrokerSetRemove(app, "brokersremove")
self.add_mode(self.__brokers_remove)
@@ -87,15 +86,9 @@
self.__profile = BrokerProfileFrame(app, "profile")
self.add_mode(self.__profile)
- self.__profile_add = BrokerProfileAdd(app, "profileadd")
- self.add_mode(self.__profile_add)
-
self.__cluster = BrokerClusterFrame(app, "cluster")
self.add_mode(self.__cluster)
- self.__cluster_add = BrokerClusterAdd(app, "clusteradd")
- self.add_mode(self.__cluster_add)
-
self.__system = SystemFrame(app, "system")
self.add_mode(self.__system)
@@ -142,8 +135,8 @@
return self.page().set_current_frame(session, frame)
- def show_broker_add(self, session):
- frame = self.show_mode(session, self.__broker_add)
+ def show_brokers_add(self, session):
+ frame = self.show_mode(session, self.__brokers_add)
return self.page().set_current_frame(session, frame)
def show_brokers_remove(self, session):
@@ -160,19 +153,11 @@
frame.set_object(session, profile)
return self.page().set_current_frame(session, frame)
- def show_broker_profile_add(self, session):
- frame = self.show_mode(session, self.__profile_add)
- return self.page().set_current_frame(session, frame)
-
def show_broker_cluster(self, session, cluster):
frame = self.show_mode(session, self.__cluster)
frame.set_object(session, cluster)
return self.page().set_current_frame(session, frame)
- def show_broker_cluster_add(self, session):
- frame = self.show_mode(session, self.__cluster_add)
- return self.page().set_current_frame(session, frame)
-
def show_system(self, session, system):
frame = self.show_mode(session, self.__system)
frame.set_object(session, system)
18 years, 2 months
rhmessaging commits: r1654 - in store/trunk/cpp/tests/jrnl: jtt and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-02-07 08:06:07 -0500 (Thu, 07 Feb 2008)
New Revision: 1654
Modified:
store/trunk/cpp/tests/jrnl/_ut_time_ns.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_data_src.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_init_params.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_read_arg.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_test_case.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result_agregation.cpp
store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_set.cpp
Log:
Missing QPID_AUTO_TEST_SUITE_END() added in unit tests - these affect F8 (ie boost 1.34), not RHEL or earlier Fedoras
Modified: store/trunk/cpp/tests/jrnl/_ut_time_ns.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_ut_time_ns.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/_ut_time_ns.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -149,3 +149,5 @@
time_ns t3(-12, 345);
BOOST_CHECK_EQUAL(t3.str(9), "-11.999999655");
}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_data_src.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_data_src.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_data_src.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -93,3 +93,5 @@
BOOST_CHECK_EQUAL(xid[j-1], (char)('a' + ((j-1)%26)));
}
}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_init_params.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_init_params.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_init_params.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -76,3 +76,5 @@
BOOST_CHECK_EQUAL(jip2.jfsize_sblks(), jfsize_sblks);
}
+QPID_AUTO_TEST_SUITE_END()
+
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -153,3 +153,5 @@
jdir::delete_dir(jdir);
}
+QPID_AUTO_TEST_SUITE_END()
+
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_read_arg.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_read_arg.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_read_arg.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -131,3 +131,5 @@
s4 << ra;
BOOST_CHECK_EQUAL(s4.str(), "RANDOM");
}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_test_case.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_test_case.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_test_case.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -101,3 +101,5 @@
tc.clear();
BOOST_CHECK_EQUAL(tc.num_results(), unsigned(0));
}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -185,3 +185,5 @@
BOOST_CHECK_EQUAL(tcr.num_deq(), num_deq);
BOOST_CHECK_EQUAL(tcr.num_read(), num_read);
}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result_agregation.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result_agregation.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_result_agregation.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -171,3 +171,5 @@
tcrp->set_test_time(ts);
return tcrp;
}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_set.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_set.cpp 2008-02-07 05:26:12 UTC (rev 1653)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_test_case_set.cpp 2008-02-07 13:06:07 UTC (rev 1654)
@@ -134,3 +134,5 @@
return true;
return false;
}
+
+QPID_AUTO_TEST_SUITE_END()
18 years, 2 months
rhmessaging commits: r1653 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-02-07 00:26:12 -0500 (Thu, 07 Feb 2008)
New Revision: 1653
Modified:
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/parameters.py
mgmt/cumin/python/cumin/system.py
mgmt/cumin/python/cumin/system.strings
Log:
Makes a minimal portion of the system ui work (against some made up
data).
Hides the grid tab as it won't appear for a time.
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2008-02-06 21:42:44 UTC (rev 1652)
+++ mgmt/cumin/python/cumin/page.py 2008-02-07 05:26:12 UTC (rev 1653)
@@ -96,6 +96,9 @@
self.__cluster_add = BrokerClusterAdd(app, "clusteradd")
self.add_mode(self.__cluster_add)
+ self.__system = SystemFrame(app, "system")
+ self.add_mode(self.__system)
+
def get_title(self, session, object):
return "Main"
@@ -170,6 +173,11 @@
frame = self.show_mode(session, self.__cluster_add)
return self.page().set_current_frame(session, frame)
+ def show_system(self, session, system):
+ frame = self.show_mode(session, self.__system)
+ frame.set_object(session, system)
+ return self.page().set_current_frame(session, frame)
+
class MainFrameTabs(LinkSet):
def __init__(self, app, name):
super(MainFrameTabs, self).__init__(app, name)
@@ -181,7 +189,7 @@
self.add_parameter(self.selection)
self.add_link(self.MessagingTab(app, "mtab"))
- self.add_link(self.GridTab(app, "gtab"))
+ #self.add_link(self.GridTab(app, "gtab"))
self.add_link(self.SystemsTab(app, "stab"))
class Tab(Link):
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2008-02-06 21:42:44 UTC (rev 1652)
+++ mgmt/cumin/python/cumin/page.strings 2008-02-07 05:26:12 UTC (rev 1653)
@@ -708,10 +708,12 @@
[MainFrame.html]
<div id="head">
<div>
+ <!--
<ul id="user">
<li>Hi, <strong>user</strong></li>
<li><a class="nav" href="">Log Out</a></li>
</ul>
+ -->
{tabs}
</div>
Modified: mgmt/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/cumin/python/cumin/parameters.py 2008-02-06 21:42:44 UTC (rev 1652)
+++ mgmt/cumin/python/cumin/parameters.py 2008-02-07 05:26:12 UTC (rev 1653)
@@ -79,6 +79,13 @@
def do_marshal(self, session):
return str(session.id)
+class SystemParameter(Parameter):
+ def do_unmarshal(self, string):
+ return System.get(int(string))
+
+ def do_marshal(self, session):
+ return str(session.id)
+
class VirtualHostParameter(Parameter):
def do_unmarshal(self, string):
return Vhost.get(int(string))
Modified: mgmt/cumin/python/cumin/system.py
===================================================================
--- mgmt/cumin/python/cumin/system.py 2008-02-06 21:42:44 UTC (rev 1652)
+++ mgmt/cumin/python/cumin/system.py 2008-02-07 05:26:12 UTC (rev 1653)
@@ -51,7 +51,7 @@
self.add_mode(self.view)
self.set_view_mode(self.view)
- def get_title(self, session, broker):
+ def get_title(self, session, system):
return "System '%s'" % system.sysId
class SystemStatus(CuminStatus):
@@ -67,11 +67,18 @@
self.tabs = TabbedModeSet(app, "tabs")
self.add_child(self.tabs)
- self.add_tab(SystemStatsTab(app, "stats"))
+ self.tabs.add_tab(self.SystemStatsTab(app, "stats"))
- def get_title(self, session, broker):
- return "System '%s'" % broker.name
+ def get_title(self, session, system):
+ return "System '%s'" % system.sysId
+ def render_created_deleted(self, session, system):
+ return "%s – %s" % (fmt_datetime(system.creationTime),
+ fmt_datetime(system.deletionTime))
+
+ def render_updated(self, session, system):
+ return fmt_datetime(system.recTime)
+
def render_data_url(self, session, model):
return "model.xml"
Modified: mgmt/cumin/python/cumin/system.strings
===================================================================
--- mgmt/cumin/python/cumin/system.strings 2008-02-06 21:42:44 UTC (rev 1652)
+++ mgmt/cumin/python/cumin/system.strings 2008-02-07 05:26:12 UTC (rev 1653)
@@ -23,3 +23,11 @@
</table>
{hidden_inputs}
</form>
+
+[SystemView.html]
+<h1><img src="resource?name=system-36.png"/>{title}</h1>
+
+<table class="props">
+ <tr><th>Created – Deleted</th><td>{created_deleted}</td></tr>
+ <tr><th>Updated</th><td>{updated}</td></tr>
+</table>
18 years, 2 months
rhmessaging commits: r1652 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-02-06 16:42:44 -0500 (Wed, 06 Feb 2008)
New Revision: 1652
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/page.strings
Log:
Simplifies the management of the couple and coupled states of brokers
and registrations in the broker frame.
Adds a notice message and logic to reload the page when the broker for
a registration is not available.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2008-02-06 21:38:19 UTC (rev 1651)
+++ mgmt/cumin/python/cumin/broker.py 2008-02-06 21:42:44 UTC (rev 1652)
@@ -273,14 +273,22 @@
pass
class BrokerView(CuminView):
+ """
+ Despite the name, this is actually a view of two objects, usually
+ coupled: a BrokerRegistration and a Broker.
+ """
+
def __init__(self, app, name):
super(BrokerView, self).__init__(app, name)
self.status = BrokerStatus(app, "status")
self.add_child(self.status)
+ self.body = ModeSet(app, "body")
+ self.add_child(self.body)
+
self.tabs = TabbedModeSet(app, "tabs")
- self.add_child(self.tabs)
+ self.body.add_mode(self.tabs)
self.tabs.add_tab(self.BrokerQueueTab(app, "queues"))
self.tabs.add_tab(self.BrokerExchangeTab(app, "exchanges"))
@@ -290,22 +298,40 @@
#self.tabs.add_tab(self.BrokerStatsTab(app, "stats"))
#self.tabs.add_tab(self.BrokerLogTab(app, "log"))
+ self.missing = self.BrokerMissing(app, "missing")
+ self.body.add_mode(self.missing)
+
+ self.vhost = Attribute(app, "vhost")
+ self.add_attribute(self.vhost)
+
+ class BrokerMissing(Widget):
+ pass
+
def show_config(self, session):
return self.tabs.show_mode(session, self.config)
- def get_title(self, session, broker):
- return "Broker '%s'" % broker.name
+ def get_title(self, session, reg):
+ return "Broker '%s'" % reg.name
+ def do_process(self, session, reg):
+ if reg.broker:
+ vhost = Vhost.selectBy(broker=reg.broker, name="/")[0]
+ self.vhost.set(session, vhost)
+ else:
+ self.body.show_mode(session, self.missing)
+
+ super(BrokerView, self).do_process(session, reg)
+
def render_data_url(self, session, model):
return "model.xml"
- def render_address(self, session, broker):
- return broker.host + (broker.port and ":%i" % broker.port or "")
+ def render_address(self, session, reg):
+ return reg.host + (reg.port and ":%i" % reg.port or "")
- def render_group_links(self, session, broker):
+ def render_group_links(self, session, reg):
links = list()
- for group in broker.groups:
+ for group in reg.groups:
branch = session.branch()
self.frame().frame().show_broker_group(branch, group).show_view \
(branch)
@@ -313,8 +339,8 @@
return ", ".join(links)
- def render_cluster_link(self, session, broker):
- cluster = broker.cluster
+ def render_cluster_link(self, session, reg):
+ cluster = reg.cluster
if cluster:
branch = session.branch()
@@ -323,8 +349,8 @@
else:
return fmt_none()
- def render_profile_link(self, session, broker):
- profile = broker.profile
+ def render_profile_link(self, session, reg):
+ profile = reg.profile
if profile:
branch = session.branch()
@@ -334,92 +360,32 @@
return fmt_none()
class BrokerQueueTab(QueueSet):
- def get_object(self, session, broker):
- # XXX
- if not broker:
- return
+ def get_object(self, session, reg):
+ return self.parent.parent.parent.vhost.get(session)
- broker = broker.broker # Navigate from registration to real broker
- if broker:
- return Vhost.selectBy(broker=broker, name="/")[0]
-
def get_title(self, session, broker):
- vhost = self.get_object(session, broker)
- if vhost:
- return super(BrokerView.BrokerQueueTab, self).get_title \
- (session, vhost)
- else:
- return "Queues"
+ vhost = self.parent.parent.parent.vhost.get(session)
+ return super(BrokerView.BrokerQueueTab, self).get_title \
+ (session, vhost)
- def do_process(self, session, vhost):
- if vhost:
- super(BrokerView.BrokerQueueTab, self).do_process \
- (session, vhost)
-
- def do_render(self, session, vhost):
- if vhost:
- return super(BrokerView.BrokerQueueTab, self).do_render \
- (session, vhost)
-
class BrokerExchangeTab(ExchangeSet):
- def get_object(self, session, broker):
- broker = broker.broker # Navigate from registration to real broker
- if broker:
- return Vhost.selectBy(broker=broker, name="/")[0]
+ def get_object(self, session, reg):
+ return self.parent.parent.parent.vhost.get(session)
def get_title(self, session, broker):
- vhost = self.get_object(session, broker)
- if vhost:
- return super(BrokerView.BrokerExchangeTab, self).get_title \
- (session, vhost)
- else:
- return "Exchanges"
+ vhost = self.parent.parent.parent.vhost.get(session)
+ return super(BrokerView.BrokerExchangeTab, self).get_title \
+ (session, vhost)
- def do_process(self, session, vhost):
- if vhost:
- super(BrokerView.BrokerExchangeTab, self).do_process \
- (session, vhost)
-
- def do_render(self, session, vhost):
- if vhost:
- return super(BrokerView.BrokerExchangeTab, self).do_render \
- (session, vhost)
-
class BrokerClientTab(ClientSet):
- def get_object(self, session, broker):
- broker = broker.broker # Navigate from registration to real broker
- if broker:
- return Vhost.selectBy(broker=broker, name="/")[0]
+ def get_object(self, session, reg):
+ return self.parent.parent.parent.vhost.get(session)
def get_title(self, session, broker):
- vhost = self.get_object(session, broker)
- if vhost:
- return super(BrokerView.BrokerClientTab, self).get_title \
- (session, vhost)
- else:
- return "Clients"
+ vhost = self.parent.parent.parent.vhost.get(session)
+ return super(BrokerView.BrokerClientTab, self).get_title \
+ (session, vhost)
- def do_process(self, session, vhost):
- if vhost:
- super(BrokerView.BrokerClientTab, self).do_process \
- (session, vhost)
-
- def do_render(self, session, vhost):
- if vhost:
- return super(BrokerView.BrokerClientTab, self).do_render \
- (session, vhost)
-
- class BrokerVirtualHostTab(VirtualHostSet):
- def get_title(self, session, broker):
- broker = broker.broker # Navigate from registration to real broker
- if broker:
- return "Functional Hosts %s" % fmt_count(len(broker.vhosts))
-
- def do_get_items(self, session, broker):
- broker = broker.broker # Navigate from registration to real broker
- if broker:
- return sorted_by(broker.vhosts)
-
class BrokerConfigTab(ConfigPropertySet):
def get_title(self, session, broker):
return "Configuration"
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2008-02-06 21:38:19 UTC (rev 1651)
+++ mgmt/cumin/python/cumin/broker.strings 2008-02-06 21:42:44 UTC (rev 1652)
@@ -151,8 +151,30 @@
</tr>
</table>
-{tabs}
+{body}
+[BrokerMissing.html]
+<div class="notice">
+ The broker at this address is currently unavailable. This page will
+ reload in <span id="timer_count">10</span> <span id="timer_word">seconds</span>.
+</div>
+<script>
+var secs = 10
+
+function updateTimer() {
+ secs -= 1;
+
+ count = wooly.doc().elembyid("timer_count").set("" + secs);
+ ending = wooly.doc().elembyid("timer_word").set(secs == 1 ? "second" : "seconds");
+
+ if (secs == 0) {
+ location.reload();
+ }
+}
+
+window.setInterval(updateTimer, 1000);
+</script>
+
[BrokerBrowser.html]
<table class="browser">
<tr>
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2008-02-06 21:38:19 UTC (rev 1651)
+++ mgmt/cumin/python/cumin/page.strings 2008-02-06 21:42:44 UTC (rev 1652)
@@ -74,6 +74,14 @@
padding: 0 1em;
}
+.notice {
+ margin: 2em;
+ padding: 2em;
+ border: 1px dotted black;
+ width: 66%;
+ text-align: center;
+}
+
ul.actions {
padding: 0;
margin: 0 0 1em 0;
18 years, 2 months
rhmessaging commits: r1651 - store/trunk/cpp/tests/jrnl/jtt.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-02-06 16:38:19 -0500 (Wed, 06 Feb 2008)
New Revision: 1651
Modified:
store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp
Log:
Fixed warning
Modified: store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp 2008-02-06 21:28:37 UTC (rev 1650)
+++ store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp 2008-02-06 21:38:19 UTC (rev 1651)
@@ -62,12 +62,10 @@
const std::string&
read_arg::str(const read_mode_t rm)
{
- for (std::map<std::string, read_mode_t>::const_iterator i = _map.begin(); i != _map.end(); i++)
- {
- if (i->second == rm)
- return i->first;
- }
- assert(!"map - enum mismatch");
+ std::map<std::string, read_mode_t>::const_iterator i = _map.begin();
+ while (i->second != rm && i != _map.end()) i++;
+ assert(i != _map.end());
+ return i->first;
}
// static fn
18 years, 2 months
rhmessaging commits: r1650 - store/trunk/cpp/tests/jrnl/jtt.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-02-06 16:28:37 -0500 (Wed, 06 Feb 2008)
New Revision: 1650
Modified:
store/trunk/cpp/tests/jrnl/jtt/Makefile.am
Log:
Aonther fix to the Makefile.am
Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-06 21:14:48 UTC (rev 1649)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-06 21:28:37 UTC (rev 1650)
@@ -57,7 +57,17 @@
test_case_result.cpp \
test_case_result_agregation.cpp \
test_case_set.cpp \
- test_mgr.cpp
+ test_mgr.cpp \
+ args.hpp \
+ data_src.hpp \
+ jrnl_init_params.hpp \
+ jrnl_instance.hpp \
+ read_arg.hpp \
+ test_case.hpp \
+ test_case_result.hpp \
+ test_case_result_agregation.hpp \
+ test_case_set.hpp \
+ test_mgr.hpp
jtt_LDADD = \
${LIBOBJDIR}/data_tok.o \
${LIBOBJDIR}/deq_rec.o \
18 years, 2 months