-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19846 - Drop JUnit 4 usage #11102
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?
Conversation
} | ||
|
||
public Set getEnrollments() { | ||
public Set<Enrollment> getEnrollments() { |
Check notice
Code scanning / CodeQL
Exposing internal representation Note test
after this call to getEnrollments
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/ManyToOneTest.java
Fixed
Show fixed
Hide fixed
...e-core/src/test/java/org/hibernate/orm/test/fetchstrategyhelper/FetchStrategyHelperTest.java
Fixed
Show fixed
Hide fixed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/hql/BulkManipulationTest.java
Dismissed
Show dismissed
Hide dismissed
hibernate-core/src/test/java/org/hibernate/orm/test/ternary/Employee.java
Dismissed
Show dismissed
Hide dismissed
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests
Cannot convert... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization
e204062
to
3ab1246
Compare
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest)
@Override | ||
public StandardServiceRegistry produceServiceRegistry(StandardServiceRegistryBuilder builder) { | ||
try { | ||
var dropOutput = File.createTempFile( "drop_script", ".sql" ); |
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium test
public StandardServiceRegistry produceServiceRegistry(StandardServiceRegistryBuilder builder) { | ||
try { | ||
var dropOutput = File.createTempFile( "drop_script", ".sql" ); | ||
var createOutput = File.createTempFile( "create_script", ".sql" ); |
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium test
public void testBooleanType() { | ||
final Boolean original = Boolean.TRUE; | ||
//noinspection UnnecessaryBoxing,removal,BooleanConstructorCall |
Check notice
Code scanning / CodeQL
Inefficient primitive constructor Note test
@@ -14,5 +14,7 @@ | |||
public interface ServiceRegistryProducer { | |||
StandardServiceRegistry produceServiceRegistry(StandardServiceRegistryBuilder builder); | |||
|
|||
void prepareBootstrapRegistryBuilder(BootstrapServiceRegistryBuilder bsrb); | |||
default void prepareBootstrapRegistryBuilder(BootstrapServiceRegistryBuilder bsrb) { |
Check notice
Code scanning / CodeQL
Useless parameter Note test
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest)
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest)
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest)
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest)
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest)
private MetadataImplementor metadata; | ||
private final List<AutoCloseable> toClose = new ArrayList<>(); | ||
private SessionFactoryImplementor sessionFactory; | ||
private SessionFactoryScope factoryScope; |
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
private final List<AutoCloseable> toClose = new ArrayList<>(); | ||
private SessionFactoryImplementor sessionFactory; | ||
private SessionFactoryScope factoryScope; | ||
|
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
private SessionFactoryImplementor sessionFactory; | ||
private SessionFactoryScope factoryScope; | ||
|
||
private final List<AutoCloseable> autoCloseables = new ArrayList<>(); |
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
private SessionFactoryScope factoryScope; | ||
|
||
private final List<AutoCloseable> autoCloseables = new ArrayList<>(); | ||
|
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
|
||
private final List<AutoCloseable> autoCloseables = new ArrayList<>(); | ||
|
||
public DefaultCatalogAndSchemaTest(Options options) { |
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
private final List<AutoCloseable> autoCloseables = new ArrayList<>(); | ||
|
||
public DefaultCatalogAndSchemaTest(Options options) { | ||
this.options = options; |
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
metadataSources.addInputStream( getClass().getResourceAsStream( "database-object-using-catalog-placeholder.orm.xml" ) ); | ||
metadataSources.addInputStream( getClass().getResourceAsStream( "database-object-using-schema-placeholder.orm.xml" ) ); | ||
if ( options.xmlMapping != null ) { | ||
metadataSources.addInputStream( getClass().getResourceAsStream( options.xmlMapping ) ); |
Check warning
Code scanning / CodeQL
Unsafe use of getResource Warning test
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest) * org.hibernate.orm.test.cdi.general.hibernatesearch.extended.HibernateSearchExtendedCdiSupportTest - not sure yet, all the other tests here pass with conversion - shelved for now
) | ||
@DomainModel(annotatedClasses = TheEntity.class) | ||
@SessionFactory | ||
public void testIt(CdiContainerScope containerScope, SessionFactoryScope factoryScope) { |
Check notice
Code scanning / CodeQL
Useless parameter Note test
)) | ||
@DomainModel(annotatedClasses = TheEntity.class) | ||
@SessionFactory | ||
public void testAnnotations(CdiContainerScope containerScope, SessionFactoryScope factoryScope) { |
Check notice
Code scanning / CodeQL
Useless parameter Note test
)) | ||
@DomainModel(annotatedClasses = TheEntity.class, xmlMappings = "org/hibernate/test/cdi/converters/orm.xml") | ||
@SessionFactory | ||
public void testOrmXml(CdiContainerScope cdiScope, SessionFactoryScope factoryScope) { |
Check notice
Code scanning / CodeQL
Useless parameter Note test
} | ||
|
||
interface SettingResolver { | ||
Object resolve(StandardServiceRegistryBuilder registryBuilder, ExtensionContext junitContext); |
Check notice
Code scanning / CodeQL
Useless parameter Note test
Not converted... * org.hibernate.orm.test.hql.PostgreSQLFunctionSelectClauseTest - registering custom function * org.hibernate.orm.test.hql.PostgreSQLFunctionWhereClauseTest - aux-db-object * org.hibernate.orm.test.id.usertype - type registrations * org.hibernate.orm.test.idgen.enhanced.HiloOptimizerConcurrencyTest - recreation of SF during tests * org.hibernate.orm.test.type.AbstractJavaTimeTypeTest subtypes - crazy parameterization (see org.hibernate.orm.test.tm.InterceptorTransactionTest) * org.hibernate.orm.test.cdi.general.hibernatesearch.extended.HibernateSearchExtendedCdiSupportTest - not sure yet, all the other tests here pass with conversion - shelved for now
Dropping usage of JUnit 4
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