Skip to content

Conversation

@mswiderski
Copy link
Contributor

… is failing with Hibernate 5

@mswiderski
Copy link
Contributor Author

@MarianMacik PR updated with your additional test

@mswiderski
Copy link
Contributor Author

Jenkins retest this

@mswiderski
Copy link
Contributor Author

Jenkins execute full downstream build

@mswiderski mswiderski added the working_in_progress DO NOT MERGE! just testing PR label Aug 19, 2018
@mswiderski
Copy link
Contributor Author

@baldimir @MarianMacik made additional updates as the previous one were not enough, please have a look

Copy link
Contributor

@baldimir baldimir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for later review, few new comments.

public void afterCompletion(int status) {
if ( status != TransactionManager.STATUS_COMMITTED ) {
this.service.rollback();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking - unnecessary empty line.


public void resetApplicationScopedPersistenceContext() {
if ( this.internalAppScopedEntityManagerFlag ) {
if ( this.appScopedEntityManager != null && this.appScopedEntityManager.isOpen() ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking #2: One space more here :)

new InsertAndFireThread(ksession.getIdentifier(), kbase, list).start();
Thread thread = new InsertAndFireThread(ksession.getIdentifier(), kbase, list);
threads.add(thread);
thread.start();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a second thought, I think we need to use an Executor with proper shutdown here, so we know that the threads ended.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We know this, simply because we are waiting for them on the line 114.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK after discussion it can stay as it is.

executor.execute(() -> {
try {
ksession1.insert(1);
ksession1.dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please dispose the session also in a try-finally, so we are really sure it got disposed. It could be a large try-finally that covers most of this test and at the end of the test disposes everything disposable.

ksession2.insert(2);
ksession1latch.countDown();
}
ksession2.dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comment about dispose. I found out that when something bad happens to a test (could be caused by environment) and the session doesn't get disposed, if there is a Timer in the session, then it stays running till the whole test suite ends. That is why I am very cautious about proper session dispose.

@mswiderski
Copy link
Contributor Author

@baldimir changes applied

@mswiderski mswiderski removed the working_in_progress DO NOT MERGE! just testing PR label Aug 20, 2018
@mswiderski
Copy link
Contributor Author

Jenkins execute full downstream build

@MarianMacik
Copy link
Member

SLA tests are unstable on KIE Jenkins so I think their fails are unrelated, but I am worried about migration tests (migration report was null in these tests), though it can be unrelated as well.

@mswiderski
Copy link
Contributor Author

@MarianMacik migration related tests should be already fixed by
kiegroup/droolsjbpm-integration@442e8e1 but the full downstream was started before it got merged.
There is another one in jbpm that has additional PR kiegroup/jbpm#1307

@MarianMacik
Copy link
Member

jenkins retest this

@mswiderski
Copy link
Contributor Author

Jenkins retest this

@mswiderski
Copy link
Contributor Author

Jenkins execute full downstream build

@MarianMacik
Copy link
Member

Looks good now (only unstable tests failed). We are good to merge.

@mswiderski mswiderski merged commit be6ea2c into apache:master Aug 22, 2018
@mswiderski mswiderski deleted the DROOLS-1393 branch August 22, 2018 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants