Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 597 -- entity manager is properly removed even if close operation fails + unit test. #820

Merged
merged 3 commits into from
Jul 18, 2014

Conversation

frido37
Copy link

@frido37 frido37 commented Jul 16, 2014

No description provided.

@sameb
Copy link
Member

sameb commented Jul 16, 2014

Thanks for the this! @dhanji, can you glance at it? You're most familiar with persist.

@frido37 - - could you sign https://developers.google.com/open-source/cla/individual if you haven't already? (I'll try to set up automatic pull request checks for the CLA sometime today / this week.)

@frido37
Copy link
Author

frido37 commented Jul 16, 2014

@sameb -- I already signed the CLA (three weeks ago)

@sameb
Copy link
Member

sameb commented Jul 16, 2014

@frido37 frido37 added cla: no and removed cla: yes labels Jul 16, 2014
@sameb
Copy link
Member

sameb commented Jul 16, 2014

Sorry about that auto-comment, it doesn't seem to have found your signature. Looks like the script works based off the email in your commit (see https://github.com/google/guice/pull/820.patch), which is different than the email you signed the CLA with (an @gmail.com). I'll figure out what to do. Sorry about the noise!

@sameb sameb removed the cla: no label Jul 16, 2014
when(factory.createEntityManager()).thenReturn(entityManager);
}

@Test
Copy link
Member

Choose a reason for hiding this comment

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

can you confirm this test is actually running? i didn't think we used junit4. might need to convert to junit3.

@sameb
Copy link
Member

sameb commented Jul 17, 2014

After confirmation that the test actually runs (or converting to junit3 if it isn't), this LGTM. I'd love @dhanji to pipe in, but no need to wait for him if he's not around.

@frido37
Copy link
Author

frido37 commented Jul 18, 2014

In the log of travis ci is see the following:

Running com.google.inject.persist.jpa.JpaPersistServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.7 sec

@sameb
Copy link
Member

sameb commented Jul 18, 2014

Surprising! For consistency with the rest of the package, would you be able to convert to JUnit3 style tests anyway? Looks like everything in the extension and the rest of Guice uses JUnit3-style tests. I'll merge in after that, thanks!

@frido37
Copy link
Author

frido37 commented Jul 18, 2014

Test is now converted to Junit3 - the change is in the second commit of this pull request.

@@ -0,0 +1,49 @@
package com.google.inject.persist.jpa;
Copy link
Member

Choose a reason for hiding this comment

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

sorry i missed this before: please add the apache copyright header to this file. you can copy it from the top of the other ones, just fix up the year.

sameb added a commit that referenced this pull request Jul 18, 2014
Fix issue 597 -- entity manager is properly removed even if close operation fails + unit test.
@sameb sameb merged commit 1aa8696 into google:master Jul 18, 2014
@sameb
Copy link
Member

sameb commented Jul 18, 2014

Thanks again for submitting this!

@frido37
Copy link
Author

frido37 commented Jul 28, 2014

Thanks for accepting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants