Skip to content

dbeaver/pro#9568 move tests to ce#4402

Open
HocKu7 wants to merge 8 commits into
develfrom
dbeaver/pro#9568-move-tests-to-ce
Open

dbeaver/pro#9568 move tests to ce#4402
HocKu7 wants to merge 8 commits into
develfrom
dbeaver/pro#9568-move-tests-to-ce

Conversation

@HocKu7

@HocKu7 HocKu7 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@codacy-production

codacy-production Bot commented Jun 16, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 minor

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
CodeStyle 2 minor

View in Codacy

🟢 Metrics 79 complexity · 38 duplication

Metric Results
Complexity 79
Duplication 38

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves/introduces platform-level server tests into the CloudBeaver CE test module to cover key GraphQL/admin and SQL endpoint behaviors.

Changes:

  • Added reusable test utilities for GraphQL calls and H2 datasource setup.
  • Added new CE platform tests for SQL result sets, grouping, FK navigation, and data filtering.
  • Added new CE platform tests for admin user creation and last-login-time behavior, and registered them in the CE server test suite.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/util/WebDBTestUtils.java Utility for creating an H2 datasource for platform tests
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/util/GraphQLTestConstant.java Centralized GraphQL query/mutation text used by tests
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/util/GraphQLTestClientWrapper.java Convenience wrapper around WebGQLClient for async SQL/task flows
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/util/DBTestConstants.java Shared DB-related constants for tests
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/sql/RowIdResultSetTest.java Verifies row identifier metadata behavior for PK/composite PK/no-PK
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/sql/GroupingEndpointTest.java Verifies SQL grouping endpoint behavior for 1- and 2-column grouping
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/sql/GenerateSQLResultSetTest.java Verifies SQL generation from result sets under different generator options
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/sql/ForeignKeyNavigationEndpointTest.java Verifies forward/reverse FK metadata and navigation behavior
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/sql/DataFilterConstraintsTest.java Verifies server-side filtering constraints (equals/not-equals/is-null)
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/CloudbeaverDBTest.java New shared base test class to bootstrap session + H2 datasource + SQL context
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/CEServerTestSuite.java Registers newly added platform tests in the CE suite
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/admin/AdminLastLoginTimeTest.java Ensures lastLoginTime is populated after successful authentication
server/test/io.cloudbeaver.test.platform/src/io/cloudbeaver/test/platform/admin/AdminCreateUserTest.java Ensures createUser trims incoming userId

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +52 to +54
DBPConnectionConfiguration configuration = new DBPConnectionConfiguration();
configuration.setUrl(url);

Comment on lines +143 to +151
public String openSession() throws Exception {
Map<String, Object> openVars = new HashMap<>();
openVars.put("defaultLocale", "en");
Map<String, Object> bodyAndHeaders = client.sendQueryAndGetHeaders(GQL_OPEN_SESSION, openVars, Map.of());
Map<String, Object> headers = JSONUtils.getObject(bodyAndHeaders, "headers");
String cookie = JSONUtils.getString(headers, "Set-Cookie");
Map<String, String> cookieMap = parseCookies(cookie);
return cookieMap.get("cb-session-id");
}
Comment on lines +99 to +101
Thread.sleep(200);
}
}
yagudin10
yagudin10 previously approved these changes Jun 17, 2026
@HocKu7 HocKu7 force-pushed the dbeaver/pro#9568-move-tests-to-ce branch from 199454f to 1514fd7 Compare June 17, 2026 15:26
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

Successfully merging this pull request may close these issues.

3 participants