DataSetProvider incompatible data types on extected data set
See original GitHub issuepublic class UserDataSetProvider implements DataSetProvider {
@Override
public IDataSet provide() throws DataSetException {
DataSetBuilder builder = new DataSetBuilder();
IDataSet dataSet = builder
.table("user")
.columns("id", "name")
.values(1,"@realpestano")
.build();
return dataSet;
}
}
@DBRider
@DBUnit(caseSensitiveTableNames = true)
class UserTest {
@Test
@DataSet(provider = UserDataSetProvider.class, cleanBefore = true)
@ExpectedDataSet(provider = UserDataSetProvider::class)
public void shouldSeedDatabaseProgrammatically() {
List<User> users = EntityManagerProvider.em().createQuery("select u from User u ").getResultList();
assertThat(users).
isNotNull().
isNotEmpty().hasSize(3).
extracting("name").
contains("@dbunit", "@dbrider", "@new row");
}
}
We get an error
junit.framework.ComparisonFailure: Incompatible data types: (table=user, col=id)
Expected :NUMERIC
Actual :BIGINT
PostgreSQL 11 database.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
incompatible data types in combination" Error when Loading ...
"java.sql.SQLSyntaxErrorException: incompatible data types in combination" Error when Loading Data from XML to Oracle Database (Doc ID 2901081.1).
Read more >Incompatible data types(hypersql) - java - Stack Overflow
SQLSyntaxErrorException : incompatible data type in operation: ; in LIMIT, OFFSET or FETCH in statement [ select * from( select l.
Read more >KB38458: "Incompatible datatypes in expression :"
KB38458: "Incompatible datatypes in expression :" error thrown when performing a SUM() on a column in a Text File Database in MicroStrategy ...
Read more >How to Handle the Incompatible Types Error in Java - Rollbar
The Java incompatible types error happens when a value assigned to a variable or returned by a method is incompatible with the one...
Read more >Datasnap.Provider.TDataSetProvider - Embarcadero DocWiki
Description. TDataSetProvider provides data from a dataset and resolves updates to that dataset or its database server. Use TDataSetProvider to provide data ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue with docker is related to permissions. Solution https://techoverflow.net/2017/03/01/solving-docker-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket/
Maybe it is the docker version, let me check my env which is working now.