- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.7k
 
HHH-19846 Drop JUnit 4 usage #11177
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
base: main
Are you sure you want to change the base?
HHH-19846 Drop JUnit 4 usage #11177
Conversation
| /****************************************** | ||
| * | ||
| */ | ||
| User user1 = s1.get( User.class, 1 ); // into persistent context | 
Check notice
Code scanning / CodeQL
Unread local variable Note test
| scope.inTransaction( s1 -> { | ||
| 
               | 
          ||
| Company company1 = s1.get( Company.class, 1 ); | ||
| Company company1 = s1.get( Company.class, 1 ); | 
Check notice
Code scanning / CodeQL
Unread local variable Note test
| scope.inTransaction( s1 -> { | ||
| 
               | 
          ||
| Company company1 = s1.get( Company.class, 1 ); | ||
| Company company1 = s1.get( Company.class, 1 ); | 
Check notice
Code scanning / CodeQL
Unread local variable Note test
| assertEquals( 2, readWriteVersionedCacheableItem.getTags().size() ); | ||
| // open another session | ||
| s2 = scope.getSessionFactory().openSession(); | ||
| s2.beginTransaction(); | 
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning test
s2
this
| return key; | ||
| var it = cache.entrySet().iterator(); | ||
| try { | ||
| it.remove(); | 
Check warning
Code scanning / CodeQL
Call to Iterator.remove may fail Warning test
the collection
| cache.put( new Simple( 1 ), managedEntity ); | ||
| public void testManagedEntityAssociatedWithNewAndExistingMergeEntities(SessionFactoryScope scope) { | ||
| scope.inSession( session -> { | ||
| MergeContext cache = new MergeContext( (EventSource) session, new DoNothingEntityCopyObserver() ); | 
Check failure
Code scanning / CodeQL
Container contents are never accessed Error test
| } | ||
| public void testManagedAssociatedWith2ExistingMergeEntities(SessionFactoryScope scope) { | ||
| scope.inSession( session -> { | ||
| MergeContext cache = new MergeContext( (EventSource) session, new DoNothingEntityCopyObserver() ); | 
Check failure
Code scanning / CodeQL
Container contents are never accessed Error test
| } | ||
| public void testRemoveNonExistingEntity(SessionFactoryScope scope) { | ||
| scope.inSession( session -> { | ||
| MergeContext cache = new MergeContext( (EventSource) session, new DoNothingEntityCopyObserver() ); | 
Check failure
Code scanning / CodeQL
Container contents are never accessed Error test
| public void resetListener() { | ||
| @BeforeEach | ||
| void setUp(SessionFactoryScope scope) { | ||
| SessionFactoryImplementor sessionFactory = scope.getSessionFactory(); | 
Check notice
Code scanning / CodeQL
Unread local variable Note test
| entityManagerFactory.unwrap( SessionFactoryImplementor.class ).getEventListenerRegistry() | ||
| .prependListeners( EventType.LOAD, new SecuredLoadEntityListener() ); | ||
| 
               | 
          ||
| Customer customer = entityManager.find( Customer.class, customerId ); | 
Check notice
Code scanning / CodeQL
Unread local variable Note test
[Please describe here what your change is about]
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19846