Comments (7)
Having said that, I see that the Travis build has just broken again:
https://travis-ci.org/bitronix/btm/jobs/22012562
Even worse, this particular failure has been happening for a while!
https://travis-ci.org/bitronix/btm/jobs/13401645
https://travis-ci.org/bitronix/btm/jobs/11306852
This looks like a race condition - conflicts with static variables, perhaps? Am I wasting my time here?
from btm.
I suppose this is related to #20, right? If so, I propose that you close this issue.
Thanks!
from btm.
#20 fixes an intermittent failure with JmsProperUsageMockTest, which only happens for me on GitHub. This issue is with RecovererTest, which sometimes happens locally but not on GitHub.
from btm.
There may be a race in the recoverer code or test that only JDK 7 can trigger, that wouldn't be new. I'll try to see if I can reproduce that locally.
from btm.
NetBeans has flagged this as an issue in PoolingConnectionFactory:
public class PoolingConnectionFactory extends ResourceBean implements ConnectionFactory, XAResourceProducer, PoolingConnectionFactoryMBean {
private volatile transient List<JmsPooledConnection> xaStatefulHolders;
// ... etc
public XAResourceHolder findXAResourceHolder(XAResource xaResource) {
synchronized (xaStatefulHolders) {
// ... etc
}
return null;
}
}
It doesn't like synchronising on a "volatile" variable; and there's no good reason why xaStatefulHolders cannot be "final" anyway.
from btm.
Synchronising on a volatile field may be a dubious construct, but making the field final doesn't fix this.
But it occurs to me that the failing test "testBackgroundRecovererSkippingInFlightTransactions" is alphabetically the first test case in RecovererTest. Also, "EventRecorder.clear()" is called as part of the test tearDown() rather than the setUp(), which means that EventRecorder.clear() is not executed before RecovererTest's first test case.
And "yes", JUnit does execute testBackgroundRecovererSkippingInFlightTransactions() first :-).
So I'm thinking that this intermittent failure is due to EventRecorder sometimes containing a lingering event from an earlier Test. And the fix is to call EventRecorder.clear() in RecovererTest.setUp().
With this fix applied, the test is no longer failing. (Not so far, anyway...)
from btm.
My unit-test-jdk7 branch has now been merged.
from btm.
Related Issues (20)
- MySQL 8 support HOT 1
- How to configure log4j debug logs for bitrnix
- XAFactories which implement java.util.Map (MQXAConnectionFactory) cannot be initialized properly HOT 3
- Why is there no activity on the Bitronix github? HOT 2
- Using bitronox manager, XA not working with my custom dev-kit adapter HOT 7
- Transaction Manager problem HOT 1
- Glad to see the BTM project active again
- searching best solution for error handling HOT 1
- Error show in tomcat logs HOT 2
- Connection pool unable to recover after database connectivity loss HOT 1
- Question on rollback HOT 1
- Clarify requirements for XAResourceProducer unique name HOT 3
- Support custom XAResourceProducer implementations in ResourceLoader HOT 1
- Transaction Timeout Not working HOT 1
- Using ActiveMQ and bitronix-transaction-manager redelivery issue HOT 1
- Data Security Issue : Vendor property password is getting logged without masking HOT 1
- XA making multiple connections with MQ manager HOT 3
- Is it possible to recover heuristic exception.
- Is it possible to release 3.x?
- Issues related to spring cloud + feign HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btm.