kieker-monitoring / kieker

Kieker's main repository
Apache License 2.0
70 stars 41 forks source link

[KIEKER-57] Need (automated) test for JMS readers/writers #1366

Closed rju closed 2 weeks ago

rju commented 2 weeks ago

JIRA Issue: KIEKER-57 Need (automated) test for JMS readers/writers Original Reporter: Andre van Hoorn


For example, based on the user guide example

rju commented 2 weeks ago

author André van Hoorn -- Tue, 5 Feb 2013 09:18:13 +0100

See also KIEKER-806 Done (return value of run() method)

rju commented 2 weeks ago

author nils-christian -- Tue, 3 Sep 2013 11:45:33 +0200

I added a test based on the JMXWriter/Reader test for JMS with changeset d4d33716406d4201fdf337ea32091a20ea5ea8f8. It was just necessary to start an embedded broker:

private void startEmbeddedJMSBroker() throws Exception {
    final BrokerService broker = new BrokerService();
    broker.addConnector(PROVIDERURL);
    broker.start();
}

I had to include an additional jar file from ActiveMQ in order to provide a JMS implementation for the tests.

André, could you please take a look at the test, whether it is enough or not (it uses just the records from AbstractWriterReaderTest)? I also copied the content for the license file directly from ActiveMQ's license file
- not sure whether everything in it is really needed (additional sections).

rju commented 2 weeks ago

author nils-christian -- Tue, 3 Sep 2013 13:40:21 +0200

Jenkins is not able to build Kieker with the ActiveMQ lib for some reason
- although it should be compatible with Java 1.5. I tested an older version of 5.X, but it did not change anything. An even older version of 4.X resulted in problems with the DBReader (due to Apache Derby within the jar).

I retrieved the modifications for now.

rju commented 2 weeks ago

author Jan Waller -- Tue, 3 Sep 2013 14:48:13 +0200

According to the error, it still was a Java 1.6 library.
You can always load the source and compile with an older compiler. Most libraries don't actually need newer Java versions.

rju commented 2 weeks ago

author nils-christian -- Wed, 4 Sep 2013 19:33:57 +0200

Thanks for the hint. I tried to compile it with 1.5, but ActiveMQ uses some dependencies which have been compiled with 1.6 as well. I am currently testing some other JMS implementations.

rju commented 2 weeks ago

author nils-christian -- Mon, 9 Sep 2013 18:43:29 +0200

As discussed today: I add a fake JMS message broker between the reader and the writer (using some fake factories to create the connections).

rju commented 2 weeks ago

author nils-christian -- Tue, 10 Sep 2013 09:54:15 +0200

I added the fake message broker and the JMS basic test with changeset f12cead43c9f7eecda0388b776b11adbb65aa71c.

Although I already mentioned this in the javadoc comments, I want to stress this part: The nine additional classes are part of a very basic, fake message broker and have only been designed for this specific test and situation. It uses even singleton producer and consumer to deliver messages synchronously. Do not use them outside this test (unless you know what you are doing).