You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/01/28 04:04:48 UTC
[1/2] activemq-artemis git commit: Improvements on JDBC Test
Repository: activemq-artemis
Updated Branches:
refs/heads/master 7673c3108 -> f149e76b3
Improvements on JDBC Test
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/a5aa4467
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/a5aa4467
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/a5aa4467
Branch: refs/heads/master
Commit: a5aa44670d4f447da3d095e05b70bc0166ffc7d9
Parents: 7673c31
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Jan 27 18:36:21 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jan 27 21:56:59 2016 -0500
----------------------------------------------------------------------
.../tests/integration/jdbc/store/journal/JDBCJournalTest.java | 5 +++++
.../tests/integration/persistence/StorageManagerTestBase.java | 2 +-
.../artemis/tests/integration/xa/BasicXaRecoveryTest.java | 5 +++++
3 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a5aa4467/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jdbc/store/journal/JDBCJournalTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jdbc/store/journal/JDBCJournalTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jdbc/store/journal/JDBCJournalTest.java
index 6d58ed8..d978f08 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jdbc/store/journal/JDBCJournalTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jdbc/store/journal/JDBCJournalTest.java
@@ -26,14 +26,19 @@ import org.apache.activemq.artemis.core.journal.IOCompletion;
import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
import org.apache.activemq.artemis.core.journal.RecordInfo;
import org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl;
+import org.apache.activemq.artemis.tests.util.ThreadLeakCheckRule;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class JDBCJournalTest {
+ @Rule
+ public ThreadLeakCheckRule threadLeakCheckRule = new ThreadLeakCheckRule();
+
private static final String JOURNAL_TABLE_NAME = "MESSAGE_JOURNAL";
private JDBCJournalImpl journal;
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a5aa4467/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/StorageManagerTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/StorageManagerTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/StorageManagerTestBase.java
index 07b00db..e0b746a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/StorageManagerTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/StorageManagerTestBase.java
@@ -59,7 +59,7 @@ public abstract class StorageManagerTestBase extends ActiveMQTestBase {
this.storeType = storeType;
}
- @Parameterized.Parameters(name = "storeType")
+ @Parameterized.Parameters(name = "storeType={0}")
public static Collection<Object[]> data() {
Object[][] params = new Object[][] {{StoreConfiguration.StoreType.FILE}, {StoreConfiguration.StoreType.DATABASE}};
return Arrays.asList(params);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a5aa4467/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
index ddd2f26..59cba58 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
@@ -93,6 +93,11 @@ public class BasicXaRecoveryTest extends ActiveMQTestBase {
public void setUp() throws Exception {
super.setUp();
+ if (storeType == StoreConfiguration.StoreType.DATABASE) {
+ Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+ }
+
+
addressSettings.clear();
if (storeType == StoreConfiguration.StoreType.DATABASE) {
[2/2] activemq-artemis git commit: Improving bodyBuffer encode /
decode
Posted by cl...@apache.org.
Improving bodyBuffer encode / decode
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f149e76b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f149e76b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f149e76b
Branch: refs/heads/master
Commit: f149e76b3fd6589bb3fbe3df7f1e0f3a0e5cc69b
Parents: a5aa446
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Jan 27 21:31:01 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jan 27 21:57:00 2016 -0500
----------------------------------------------------------------------
.../artemis/core/message/impl/MessageImpl.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f149e76b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
index 7583ce2..df77132 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
@@ -279,8 +279,8 @@ public abstract class MessageImpl implements MessageInternal {
ByteBuf byteBuf = ChannelBufferWrapper.unwrap(getBodyBuffer().byteBuf());
byteBuf = byteBuf.duplicate();
- byteBuf.writerIndex(getBodyBuffer().writerIndex());
byteBuf.readerIndex(getBodyBuffer().readerIndex());
+ byteBuf.writerIndex(getBodyBuffer().writerIndex());
return new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, byteBuf, null);
}
@@ -439,6 +439,17 @@ public abstract class MessageImpl implements MessageInternal {
this.buffer = buffer;
decode();
+
+ // Setting up the BodyBuffer based on endOfBodyPosition set from decode
+ ResetLimitWrappedActiveMQBuffer tmpbodyBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer, null);
+ tmpbodyBuffer.readerIndex(BODY_OFFSET);
+ tmpbodyBuffer.writerIndex(endOfBodyPosition);
+ // only set this after the writer and reader is set,
+ // otherwise the buffer would be reset through the listener
+ tmpbodyBuffer.setMessage(this);
+ this.bodyBuffer = tmpbodyBuffer;
+
+
}
@Override