source: trunk/src/test/java/omq/test/stopBroker/ServerTest.java @ 46

Last change on this file since 46 was 46, checked in by stoda, 11 years ago

Refactoring tests
TODO: every test should work with every serializer

File size: 1.0 KB
Line 
1package omq.test.stopBroker;
2
3import java.util.Properties;
4
5import omq.common.broker.Broker;
6import omq.common.util.ParameterQueue;
7import omq.common.util.Serializer;
8
9public class ServerTest {
10
11        /**
12         * @param args
13         */
14        public static void main(String[] args) throws Exception {
15                Properties env = new Properties();
16                env.setProperty(ParameterQueue.USER_NAME, "guest");
17                env.setProperty(ParameterQueue.USER_PASS, "guest");
18
19                // Get host info of rabbimq (where it is)
20                env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
21                env.setProperty(ParameterQueue.SERVER_PORT, "5672");
22                env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
23                env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
24                env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
25
26                // Set info about where the message will be sent
27                env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
28                env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
29
30                BrokerKillerImpl bki = new BrokerKillerImpl();
31
32                Broker.initBroker(env);
33                Broker.bind("bk", bki);
34        }
35
36}
Note: See TracBrowser for help on using the repository browser.