Skip to content
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

org.dbunit.dataset.NoSuchTableException: users #152

Open
arthurdn opened this issue Sep 27, 2018 · 0 comments
Open

org.dbunit.dataset.NoSuchTableException: users #152

arthurdn opened this issue Sep 27, 2018 · 0 comments

Comments

@arthurdn
Copy link

org.dbunit.dataset.NoSuchTableException: users

My test based on com.github.springtestdbunit:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {TestDataConfiguration.class})
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class,
    DirtiesContextTestExecutionListener.class,
    TransactionalTestExecutionListener.class,
    DbUnitTestExecutionListener.class})
public class OrderServiceTest {//...
@Test
@Rollback
@DirtiesContext
@DatabaseSetup(value = "/db.unit/beforeSaveOrder.xml")
@ExpectedDatabase(assertionMode = NON_STRICT, value =     "/db.unit/afterSaveOrder.xml")
public void save() {/****/};}

Here is hibernate.hbm2ddl.auto property from spring boot app:

hibernate.hbm2ddl.auto=create-drop

User class:

@Data
@Entity
@Where(clause = BaseConstants.BASE_MODEL_CONDITION)
@Table(name = "users", schema = BaseConstants.SCHEMA)
public class User extends BaseModel implements Serializable {/****/}

How to fix this?

Works in not test env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant