[
https://issues.apache.org/jira/browse/JENA-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526206#comment-15526206
]
ASF GitHub Bot commented on JENA-1223:
--------------------------------------
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/170#discussion_r80697618
--- Diff:
jena-arq/src/test/java/org/apache/jena/sparql/transaction/AbstractTestTransPromote.java
---
@@ -270,15 +281,30 @@ private void run_08(boolean b) {
@Test
public void promote_11() { promote_readCommit_txnCommit(true, false) ;
}
- @Test(expected = TDBTransactionException.class)
- public void promote_12() { promote_readCommit_txnCommit(false, true) ;
}
+ @Test
+ public void promote_12() {
+ expect(()->promote_readCommit_txnCommit(false, true) ,
+ getTransactionExceptionClass()) ;
+ }
+
+ private void expect(Runnable runnable, Class<?>...classes) {
--- End diff --
This might be a pinch clearer as `... Class<? extends Exception>...classes)
{`...
> Provide transaction promotion
> -----------------------------
>
> Key: JENA-1223
> URL: https://issues.apache.org/jira/browse/JENA-1223
> Project: Apache Jena
> Issue Type: Improvement
> Components: TDB
> Affects Versions: Jena 3.1.0
> Reporter: Andy Seaborne
>
> This JIRA is to add the ability for a read transaction to promote to a write
> transaction.
> API changes are necessary to expose this feature properly and uniformly.
> PR #161 provides the machinery for TDB. To avoid general API changes outside
> TDB, this happens automatically in {{DatasetGraphTransaction.getW()}} if
> enabled (by default it isn't, the PR makes no change to behaviour of TDB by
> default). It needs to be enabled with {{DatasetGraphTransaction.promotion =
> true}}. PR#161 does contain internal changes (e.g. {{DatasetGraphWrapper}})
> outside TDB.
> This leads towards a general {{begin()}} for transactions.
> This JIRA is cover discussion on the API and record changes to the subsystems.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)