diff --git a/dbms/src/test/java/org/polypheny/db/crossmodel/RelationalOnDocumentTest.java b/dbms/src/test/java/org/polypheny/db/crossmodel/RelationalOnDocumentTest.java index 4ad02671c0..4fb020b35d 100644 --- a/dbms/src/test/java/org/polypheny/db/crossmodel/RelationalOnDocumentTest.java +++ b/dbms/src/test/java/org/polypheny/db/crossmodel/RelationalOnDocumentTest.java @@ -20,12 +20,12 @@ import java.sql.ResultSet; import java.util.List; -import org.bson.BsonDocument; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.polypheny.db.TestHelper; import org.polypheny.db.mql.MqlTestTemplate; +import org.polypheny.jdbc.types.PolyDocument; @SuppressWarnings({ "SqlDialectInspection", "SqlNoDataSourceInspection" }) public class RelationalOnDocumentTest extends CrossModelTestTemplate { @@ -55,18 +55,19 @@ public static void tearDown() { @Test public void simpleSelectTest() { - executeStatements( ( s, c ) -> { ResultSet result = s.executeQuery( String.format( "SELECT * FROM %s.%s", DATABASE_NAME, COLLECTION_NAME ) ); // todo gartens || hafner there seems to be an error with the deserialization of the protovalue of type document List doc = TestHelper.convertResultSetToList( result ); // contents of documents are non-deterministic, and we cannot compare them as usual through TestHelper.checkResultSet - assertEquals( BsonDocument.parse( TEST_DATA ), BsonDocument.parse( (String) doc.get( 0 )[0] ) ); + PolyDocument document = (PolyDocument) doc.get( 0 )[0]; + assertEquals( document.size(), 2 ); + assertEquals( document.get( "_id" ).asString(), "630103687f2e95058018fd9b" ); + assertEquals( document.get( "test" ).asInt(), 3 ); } ); } - @Test public void itemJsonSelectTest() { executeStatements( ( s, c ) -> {