Fix MaskSensitiveInformationTest failure

This commit is contained in:
Andrea Boriero 2022-01-17 14:36:03 +01:00 committed by Andrea Boriero
parent a7d76b2370
commit 23a011385d
2 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,6 @@ import org.hibernate.cfg.AvailableSettings;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa; import org.hibernate.testing.orm.junit.Jpa;
import org.hibernate.testing.orm.junit.Setting;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ -22,12 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* *
* @author Bruno P. Kinoshita * @author Bruno P. Kinoshita
*/ */
@Jpa( @Jpa
integrationSettings = {
@Setting( name = AvailableSettings.USER, value = "user" ),
@Setting( name = AvailableSettings.PASS, value = "pass" )
}
)
public class MaskSensitiveInformationTest { public class MaskSensitiveInformationTest {
private static final String EXPECTED_MASKED_VALUE = "****"; private static final String EXPECTED_MASKED_VALUE = "****";

View File

@ -159,6 +159,12 @@ public class EntityManagerFactoryExtension
} }
final Map<String, Object> integrationSettings = new HashMap<>(); final Map<String, Object> integrationSettings = new HashMap<>();
( (Map<Object, Object>) Environment.getProperties() ).forEach(
(key, value) ->
integrationSettings.put( (String) key, value )
);
integrationSettings.put( GlobalTemporaryTableMutationStrategy.DROP_ID_TABLES, "true" ); integrationSettings.put( GlobalTemporaryTableMutationStrategy.DROP_ID_TABLES, "true" );
integrationSettings.put( LocalTemporaryTableMutationStrategy.DROP_ID_TABLES, "true" ); integrationSettings.put( LocalTemporaryTableMutationStrategy.DROP_ID_TABLES, "true" );
if ( !integrationSettings.containsKey( Environment.CONNECTION_PROVIDER ) ) { if ( !integrationSettings.containsKey( Environment.CONNECTION_PROVIDER ) ) {