Skip to content
Snippets Groups Projects
Commit eaee00a8 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

#26

parent 7ae9edf3
No related branches found
No related tags found
No related merge requests found
1.1:
21 Nov 2015
Bugfix (Issue #26)
Short components were not always correctly displayed in case of operation execution records.
21 Nov 2015
Feature (Issue #23)
Added filter and search possibilities for dates and times.
......
......@@ -119,9 +119,9 @@ final class LegacyTraceReconstructor extends AbstractTransformation<OperationExe
}
private String extractComponent(final String operationSignature) {
return operationSignature.replaceFirst("\\.\\w*\\(.*", "");
return operationSignature.replaceFirst("\\.<?\\w*>?\\(.*", "");
}
public boolean isTraceComplete() {
return this.traceComplete;
}
......
......@@ -120,6 +120,21 @@ public class LegacyTraceReconstructorTest {
assertThat(configuration.getOutput(), hasSize(1635));
}
@Test
public void traceReconstructionForContructorsShouldWork() throws Exception {
final List<OperationExecutionRecord> records = new ArrayList<>();
records.add(new OperationExecutionRecord("org.mybatis.jpetstore.domain.Cart.<init>()", "1", 42, 15L, 20L, "SRV1", 0, 0));
final LegacyTraceReconstructor reconstructor = new LegacyTraceReconstructor();
final List<Trace> result = new ArrayList<>();
test(reconstructor).and().send(records).to(reconstructor.getInputPort()).and().receive(result).from(reconstructor.getOutputPort()).start();
assertThat(result, hasSize(1));
assertThat(result.get(0).getRootOperationCall().getContainer(), is("SRV1"));
assertThat(result.get(0).getRootOperationCall().getComponent(), is("org.mybatis.jpetstore.domain.Cart"));
assertThat(result.get(0).getRootOperationCall().getOperation(), is("org.mybatis.jpetstore.domain.Cart.<init>()"));
}
private static class ExampleLogReconstructionConfiguration extends Configuration {
private final List<Trace> traceCollectorList = new ArrayList<>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment