Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import org.hibernate.testing.orm.junit.ServiceRegistry;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -32,7 +32,7 @@
@SessionFactory
public class AggregateFilterClauseTest {

@BeforeEach
@BeforeAll
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction(
em -> {
Expand Down Expand Up @@ -83,9 +83,9 @@ public void prepareData(SessionFactoryScope scope) {
);
}

@AfterEach
@AfterAll
public void tearDown(SessionFactoryScope scope) {
scope.getSessionFactory().getSchemaManager().truncate();
scope.dropData();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.SkipForDialect;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
Expand Down Expand Up @@ -92,7 +92,8 @@ public class FunctionTests {

public static final double ERROR = 0.00001d;

@BeforeEach @SuppressWarnings("deprecation")
@BeforeAll
@SuppressWarnings("deprecation")
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction(
em -> {
Expand Down Expand Up @@ -129,7 +130,7 @@ public void prepareData(SessionFactoryScope scope) {
);
}

@AfterEach
@AfterAll
public void dropTestData(SessionFactoryScope scope) {
scope.dropData();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.Setting;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -35,7 +35,7 @@
@ServiceRegistry(settings = @Setting(name = AvailableSettings.CRITERIA_COPY_TREE, value = "true"))
public class ILikeCriteriaTest {

@BeforeEach
@BeforeAll
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction(
em -> {
Expand All @@ -61,9 +61,9 @@ public void prepareData(SessionFactoryScope scope) {
);
}

@AfterEach
@AfterAll
public void tearDown(SessionFactoryScope scope) {
scope.getSessionFactory().getSchemaManager().truncate();
scope.dropData();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -31,7 +31,7 @@
@SessionFactory
public class ILikeTest {

@BeforeEach
@BeforeAll
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction(
em -> {
Expand All @@ -57,9 +57,9 @@ public void prepareData(SessionFactoryScope scope) {
);
}

@AfterEach
@AfterAll
public void tearDown(SessionFactoryScope scope) {
scope.getSessionFactory().getSchemaManager().truncate();
scope.dropData();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.Setting;
import org.hibernate.testing.orm.junit.SkipForDialect;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.core.JsonProcessingException;
Expand Down Expand Up @@ -77,7 +77,7 @@ public class JsonFunctionTests {

JsonHolder entity;

@BeforeEach
@BeforeAll
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction(
em -> {
Expand Down Expand Up @@ -117,9 +117,9 @@ public void prepareData(SessionFactoryScope scope) {
);
}

@AfterEach
@AfterAll
public void cleanupData(SessionFactoryScope scope) {
scope.getSessionFactory().getSchemaManager().truncate();
scope.dropData();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.SkipForDialect;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.hamcrest.CoreMatchers.anyOf;
Expand All @@ -47,7 +47,7 @@
@SessionFactory
public class StandardFunctionTests {

@BeforeEach
@BeforeAll
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction(
em -> {
Expand All @@ -62,9 +62,9 @@ public void prepareData(SessionFactoryScope scope) {
);
}

@AfterEach
@AfterAll
public void truncateDate(SessionFactoryScope scope) {
scope.getSessionFactory().getSchemaManager().truncate();
scope.dropData();
}

@Test
Expand Down