Merged from dev

This commit is contained in:
Pedro Pinto committed 2018-05-18 16:57:03 -04:00
1 parent ec7a4df5ee
commit ab950cba91
424 files changed
+31620 -4908

No files matched your search

+33 -1
View File
@@ -2,12 +2,44 @@
#include "ICmd.h"
#include "lib/utils/bts_chrono.h"
#include "lib/config/config.h"
#include "lib/config/protos/quickbus_cfg.pb.h"
#include "lib/config/protos/Ports.pb.h"
#include "lib/quickbus/quickbus.h"
#include "server/sparkd/http/WebServer.h"
#include "lib/api/public/ServiceContext.h"
#include "lib/api/test/HelloServiceServer.h"
namespace bts {
namespace cmd {
int QuickTest::execute(std::vector<std::string> const &)
void hello() {
// Create quickbus and service context
config::QuickbusNodeCfg qb_cfg;
auto& ports = config::get<config::Ports>();
qb_cfg.set_my_port(ports.qbus_port());
qbus::Quickbus quickbus(qb_cfg);
api::ServiceContext sc(&quickbus);
// serve config
http::SparkWebServer webserver(sc, ports.config_port());
// Start a test service
api::test::HelloServiceServer hello_svc(sc);
api::test::ShoutServiceServer shout_svc(sc);
sleep_for(1000000s);
}
int QuickTest::execute(std::vector<std::string> const & args)
{
if (*args.begin() == "hello") {
hello();
}
// write your discardable test code here. don't commit anything, it
// will be deleted by the next guy or gall
sleep_for(1000000s);