HHH-10373 - Correct test to work for 5.0
This commit is contained in:
parent
a46a17181e
commit
5c9c0c22ce
|
@ -8,7 +8,6 @@ package org.hibernate.test.schemaupdate.idbag;
|
|||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import org.hibernate.boot.MetadataSources;
|
||||
import org.hibernate.boot.registry.StandardServiceRegistry;
|
||||
|
@ -16,7 +15,7 @@ import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
|||
import org.hibernate.boot.spi.MetadataImplementor;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.tool.hbm2ddl.SchemaUpdate;
|
||||
import org.hibernate.tool.schema.TargetType;
|
||||
import org.hibernate.tool.hbm2ddl.Target;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -45,12 +44,12 @@ public class IdBagSequenceTest {
|
|||
.buildMetadata();
|
||||
metadata.validate();
|
||||
|
||||
new SchemaUpdate()
|
||||
.setHaltOnError( true )
|
||||
.setOutputFile( output.getAbsolutePath() )
|
||||
.setDelimiter( ";" )
|
||||
.setFormat( true )
|
||||
.execute( EnumSet.of( TargetType.SCRIPT ), metadata );
|
||||
final SchemaUpdate schemaUpdate = new SchemaUpdate( metadata );
|
||||
schemaUpdate.setHaltOnError( true );
|
||||
schemaUpdate.setOutputFile( output.getAbsolutePath() );
|
||||
schemaUpdate.setDelimiter( ";" );
|
||||
schemaUpdate.setFormat( true );
|
||||
schemaUpdate.execute( Target.SCRIPT );
|
||||
|
||||
String fileContent = new String( Files.readAllBytes( output.toPath() ) );
|
||||
assertThat( fileContent.toLowerCase().contains( "create sequence seq_child_id" ), is( true ) );
|
||||
|
|
Loading…
Reference in New Issue