提交 a9ed91ad 编写于 作者: S Serge Rider

#10000 Tycho headless surefire


Former-commit-id: 0a533947
上级 94985fb4
......@@ -66,8 +66,6 @@
<module>org.jkiss.dbeaver.net.ssh.sshj</module>
<module>org.jkiss.dbeaver.slf4j</module>
<module>org.jkiss.dbeaver.team.git</module>
<module>org.jkiss.dbeaver.headless</module>
</modules>
<profiles>
......
package org.jkiss.dbeaver.ext.test;
import java.util.Properties;
public class SQLServerFetchTest {
public static void main(String[] args) throws Exception {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Properties props = new Properties();
props.put("integratedSecurity", "true");
Connection dbCon = DriverManager.getConnection("jdbc:sqlserver://;serverName=localhost;databaseName=master", props);
dbCon.setAutoCommit(false);
try (Statement dbStat = dbCon.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)) {
int rsCount = 0;
if (dbStat.execute("sp_help TestTable")) {
dumpResultSet(dbStat, rsCount);
rsCount++;
}
while (dbStat.getMoreResults() || dbStat.getUpdateCount() != -1) {
dumpResultSet(dbStat, rsCount);
rsCount++;
}
System.out.println("Total result = " + rsCount);
}
}
public static void dumpResultSet(Statement dbStat, int number) throws SQLException {
System.out.println("================================================ " + number);
try (ResultSet dbResult = dbStat.getResultSet()) {
ResultSetMetaData md = dbResult.getMetaData();
int count = md.getColumnCount();
dumpResultSetMetaData(dbResult);
while (dbResult.next()) {
for (int i = 1; i <= count; i++) {
String colValue = dbResult.getString(i);
System.out.print(colValue + "\t");
}
System.out.println();
}
System.out.println();
} catch (SQLException e) {
e.printStackTrace();
}
}
public static void dumpResultSetMetaData(ResultSet dbResult)
{
try {
ResultSetMetaData md = dbResult.getMetaData();
int count = md.getColumnCount();
for (int i = 1; i <= count; i++) {
System.out.print(md.getColumnName(i) + " [" + md.getColumnTypeName(i) + "]\t");
}
System.out.println();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jkiss.dbeaver.runtime.ide.core.tests
Bundle-Version: 4.2.2.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-SymbolicName: org.jkiss.dbeaver.ext.postgresql.test
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: DBeaver Corp
Bundle-ClassPath: .
Fragment-Host: org.jkiss.dbeaver.ext.postgresql
Require-Bundle: org.junit,
org.jkiss.dbeaver.model
org.mockito.mockito-all,
org.jkiss.dbeaver.headless,
org.jkiss.dbeaver.model,
org.jkiss.dbeaver.registry
set MAVEN_OPTS=-Xmx2048m
call mvn clean install
pause
source.. = src/
output.. = target/classes/
bin.includes = META-INF/,\
.,\
OSGI-INF/
bin.includes = .,\
META-INF/
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jkiss.dbeaver</groupId>
<artifactId>tests</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>org.jkiss.dbeaver.ext.postgresql.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useUIHarness>false</useUIHarness>
<useUIThread>false</useUIThread>
<includes>
<include>**/*Test.java</include>
</includes>
<application>org.jkiss.dbeaver.headless.application</application>
<product>org.jkiss.dbeaver.headless.product</product>
<testRuntime>default</testRuntime>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -16,6 +16,7 @@
*/
package org.jkiss.dbeaver.ext.postgresql.model;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
......@@ -32,6 +33,7 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
import java.sql.SQLException;
import java.util.Collections;
import java.util.List;
......
......@@ -8,6 +8,7 @@ Bundle-Version: 1.0.1.qualifier
Bundle-Release-Date: 20201019
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Bundle-Activator: org.jkiss.dbeaver.headless.DBeaverTestActivator
Require-Bundle: org.eclipse.osgi,
org.eclipse.equinox.app,
org.jkiss.dbeaver.model,
......
......@@ -21,15 +21,26 @@
<plugin>
<extension point="org.eclipse.core.runtime.applications" id="application" name="Headless Application">
<extension point="org.eclipse.core.runtime.applications" id="application" name="Test Application">
<application visible="true">
<run class="org.jkiss.dbeaver.headless.DBeaverHeadlessApplication"/>
</application>
</extension>
<extension point="org.eclipse.core.runtime.products" id="product">
<product application="org.jkiss.dbeaver.headless.application" description="Headless product for unit tests" name="DBeaver Headless Product">
<product application="org.jkiss.dbeaver.headless.application" description="Headless product for unit tests" name="DBeaver Test Product">
</product>
</extension>
<extension point="org.eclipse.core.runtime.adapters">
<factory adaptableType="org.jkiss.dbeaver.runtime.DBWorkbench" class="org.jkiss.dbeaver.headless.DBeaverTestPlatformAdapterFactory">
<adapter type="org.jkiss.dbeaver.model.app.DBPPlatform"/>
<adapter type="org.jkiss.dbeaver.runtime.ui.DBPPlatformUI"/>
</factory>
</extension>
<extension point="org.jkiss.dbeaver.application">
<application id="headless-test-app" name="DBeaver Headless Test Application" description="DBeaver Headless Test Application"/>
</extension>
</plugin>
......@@ -31,9 +31,16 @@ public class DBeaverHeadlessApplication extends BaseApplicationImpl {
@Override
public Object start(IApplicationContext context) {
System.out.println("Starting headless test application");
DBPApplication application = DBWorkbench.getPlatform().getApplication();
return null;
return EXIT_OK;
}
@Override
public void stop() {
System.out.println("Starting headless test application");
super.stop();
}
@Override
......
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.headless;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Plugin;
import org.jkiss.dbeaver.ModelPreferences;
import org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import java.io.File;
import java.io.PrintStream;
/**
* The activator class controls the plug-in life cycle
*/
public class DBeaverTestActivator extends Plugin {
// The shared instance
private static DBeaverTestActivator instance;
private static File configDir;
private PrintStream debugWriter;
private DBPPreferenceStore preferences;
public DBeaverTestActivator() {
}
public static DBeaverTestActivator getInstance() {
return instance;
}
@Override
public void start(BundleContext context)
throws Exception {
super.start(context);
instance = this;
Bundle bundle = getBundle();
ModelPreferences.setMainBundle(bundle);
preferences = new BundlePreferenceStore(bundle);
}
@Override
public void stop(BundleContext context)
throws Exception {
this.shutdownCore();
if (debugWriter != null) {
debugWriter.close();
debugWriter = null;
}
instance = null;
super.stop(context);
}
/**
* Returns configuration file
*/
public static synchronized File getConfigurationFile(String fileName)
{
if (configDir == null) {
configDir = getInstance().getStateLocation().toFile();
}
return new File(configDir, fileName);
}
public DBPPreferenceStore getPreferences() {
return preferences;
}
/**
* Returns the workspace instance.
*/
public static IWorkspace getWorkspace() {
return ResourcesPlugin.getWorkspace();
}
private void shutdownCore() {
try {
// Dispose core
if (DBeaverTestActivator.instance != null) {
DBeaverTestActivator.instance = null;
}
} catch (Throwable e) {
e.printStackTrace();
System.err.println("Internal error after shutdown process:" + e.getMessage()); //$NON-NLS-1$
}
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.headless;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Platform;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.DBPExternalFileManager;
import org.jkiss.dbeaver.model.app.*;
import org.jkiss.dbeaver.model.impl.app.DefaultCertificateStorage;
import org.jkiss.dbeaver.model.impl.preferences.SimplePreferenceStore;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.jkiss.dbeaver.model.qm.QMController;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.registry.BaseApplicationImpl;
import org.jkiss.dbeaver.registry.BasePlatformImpl;
import org.jkiss.dbeaver.registry.DataSourceProviderRegistry;
import org.jkiss.dbeaver.runtime.qm.QMControllerImpl;
import org.jkiss.dbeaver.utils.ContentUtils;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.StandardConstants;
import org.osgi.framework.Bundle;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
/**
* DBeaverTestPlatform
*/
public class DBeaverTestPlatform extends BasePlatformImpl {
public static final String PLUGIN_ID = "org.jkiss.dbeaver.headless"; //$NON-NLS-1$
private static final String TEMP_PROJECT_NAME = ".dbeaver-temp"; //$NON-NLS-1$
private static final Log log = Log.getLog(DBeaverTestPlatform.class);
static DBeaverTestPlatform instance;
@NotNull
private static volatile boolean isClosing = false;
private File tempFolder;
private DBeaverTestWorkspace workspace;
private static boolean disposed = false;
private QMControllerImpl qmController;
private DefaultCertificateStorage defaultCertificateStorage;
public static DBeaverTestPlatform getInstance() {
if (instance == null) {
synchronized (DBeaverTestPlatform.class) {
if (disposed) {
throw new IllegalStateException("DBeaverTestPlatform core already disposed");
}
if (instance == null) {
// Initialize DBeaver Core
DBeaverTestPlatform.createInstance();
}
}
}
return instance;
}
private static DBeaverTestPlatform createInstance() {
log.debug("Initializing " + GeneralUtils.getProductTitle());
if (Platform.getProduct() != null) {
Bundle definingBundle = Platform.getProduct().getDefiningBundle();
if (definingBundle != null) {
log.debug("Host plugin: " + definingBundle.getSymbolicName() + " " + definingBundle.getVersion());
} else {
log.debug("!!! No product bundle found");
}
}
try {
instance = new DBeaverTestPlatform();
instance.initialize();
return instance;
} catch (Throwable e) {
log.error("Error initializing DBeaverCore", e);
throw new IllegalStateException("Error initializing DBeaverCore", e);
}
}
public static String getCorePluginID() {
return PLUGIN_ID;
}
public static boolean isStandalone() {
return BaseApplicationImpl.getInstance().isStandalone();
}
public static boolean isClosing() {
return isClosing;
}
private static void setClosing(boolean closing) {
isClosing = closing;
}
private DBeaverTestPlatform() {
}
protected void initialize() {
long startTime = System.currentTimeMillis();
log.debug("Initialize Test Platform...");
this.defaultCertificateStorage = new DefaultCertificateStorage(
DBeaverTestActivator.getConfigurationFile("cert-storage"));
// Register properties adapter
this.workspace = new DBeaverTestWorkspace(this, ResourcesPlugin.getWorkspace());
this.workspace.initializeProjects();
this.qmController = new QMControllerImpl();
super.initialize();
log.debug("Test Platform initialized (" + (System.currentTimeMillis() - startTime) + "ms)");
}
public synchronized void dispose() {
long startTime = System.currentTimeMillis();
log.debug("Shutdown Core...");
DBeaverTestPlatform.setClosing(true);
super.dispose();
workspace.dispose();
DataSourceProviderRegistry.getInstance().dispose();
// Remove temp folder
if (tempFolder != null) {
if (!ContentUtils.deleteFileRecursive(tempFolder)) {
log.warn("Can't delete temp folder '" + tempFolder.getAbsolutePath() + "'");
}
tempFolder = null;
}
DBeaverTestPlatform.instance = null;
DBeaverTestPlatform.disposed = true;
System.gc();
log.debug("Test platform shutdown completed in " + (System.currentTimeMillis() - startTime) + "ms");
}
@NotNull
@Override
public DBPWorkspace getWorkspace() {
return workspace;
}
@NotNull
@Override
public DBPResourceHandler getDefaultResourceHandler() {
return TestResourceHandler.INSTANCE;
}
@NotNull
@Override
public DBPApplication getApplication() {
return BaseApplicationImpl.getInstance();
}
@NotNull
public QMController getQueryManager() {
return qmController;
}
@NotNull
@Override
public DBPPreferenceStore getPreferenceStore() {
return DBeaverTestActivator.getInstance().getPreferences();
}
@NotNull
@Override
public DBACertificateStorage getCertificateStorage() {
return defaultCertificateStorage;
}
@NotNull
@Override
public DBASecureStorage getSecureStorage() {
return getApplication().getSecureStorage();
}
@NotNull
@Override
public DBPExternalFileManager getExternalFileManager() {
return workspace;
}
@NotNull
public File getTempFolder(DBRProgressMonitor monitor, String name) {
if (tempFolder == null) {
// Make temp folder
monitor.subTask("Create temp folder");
try {
final java.nio.file.Path tempDirectory = Files.createTempDirectory(TEMP_PROJECT_NAME);
tempFolder = tempDirectory.toFile();
} catch (IOException e) {
final String sysTempFolder = System.getProperty(StandardConstants.ENV_TMP_DIR);
if (!CommonUtils.isEmpty(sysTempFolder)) {
tempFolder = new File(sysTempFolder, TEMP_PROJECT_NAME);
if (!tempFolder.mkdirs()) {
final String sysUserFolder = System.getProperty(StandardConstants.ENV_USER_HOME);
if (!CommonUtils.isEmpty(sysUserFolder)) {
tempFolder = new File(sysUserFolder, TEMP_PROJECT_NAME);
if (!tempFolder.mkdirs()) {
tempFolder = new File(TEMP_PROJECT_NAME);
}
}
}
}
}
}
if (!tempFolder.exists() && !tempFolder.mkdirs()) {
log.error("Can't create temp directory " + tempFolder.getAbsolutePath());
}
return tempFolder;
}
@NotNull
@Override
public File getConfigurationFile(String fileName) {
return DBeaverTestActivator.getConfigurationFile(fileName);
}
@Override
public boolean isShuttingDown() {
return isClosing();
}
private static class TestPreferenceStore extends SimplePreferenceStore {
@Override
public void save() throws IOException {
}
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
* Copyright (C) 2017-2018 Alexander Fedorov (alexander.fedorov@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.headless;
import org.eclipse.core.runtime.IAdapterFactory;
import org.jkiss.dbeaver.model.app.DBPPlatform;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.runtime.resource.WorkspaceResourceResolver;
import org.jkiss.dbeaver.runtime.ui.DBPPlatformUI;
public class DBeaverTestPlatformAdapterFactory implements IAdapterFactory {
private static final Class<?>[] CLASSES = new Class[] { WorkspaceResourceResolver.class, DBPPlatform.class, DBPPlatformUI.class };
@Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
if (adaptableObject instanceof DBWorkbench) {
if (adapterType == DBPPlatform.class) {
return adapterType.cast(DBeaverTestPlatform.getInstance());
} else if (adapterType == DBPPlatformUI.class) {
return adapterType.cast(DBeaverTestPlatformUI.INSTANCE);
}
}
return null;
}
@Override
public Class<?>[] getAdapterList() {
return CLASSES;
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.headless;
import org.jkiss.dbeaver.runtime.ui.console.ConsoleUserInterface;
/**
* DBeaverTestPlatformUI
*/
public class DBeaverTestPlatformUI extends ConsoleUserInterface {
public static final DBeaverTestPlatformUI INSTANCE = new DBeaverTestPlatformUI();
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.headless;
import org.eclipse.core.resources.IWorkspace;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.model.app.DBPPlatform;
import org.jkiss.dbeaver.registry.BaseWorkspaceImpl;
/**
* DBeaver test workspace.
*/
public class DBeaverTestWorkspace extends BaseWorkspaceImpl {
DBeaverTestWorkspace(DBPPlatform platform, IWorkspace eclipseWorkspace) {
super(platform, eclipseWorkspace);
}
@NotNull
@Override
public String getWorkspaceId() {
return "test";
}
}
\ No newline at end of file
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.headless;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
import org.jkiss.dbeaver.model.app.DBPResourceHandler;
import org.jkiss.dbeaver.model.navigator.DBNNode;
import org.jkiss.dbeaver.model.navigator.DBNResource;
import java.util.Collections;
import java.util.List;
/**
* Default resource handler
*/
public class TestResourceHandler implements DBPResourceHandler {
public static final TestResourceHandler INSTANCE = new TestResourceHandler();
@Override
public int getFeatures(IResource resource) {
if (resource instanceof IFile) {
return FEATURE_OPEN | FEATURE_DELETE | FEATURE_RENAME;
} else if (resource instanceof IFolder) {
return FEATURE_DELETE | FEATURE_RENAME | FEATURE_CREATE_FOLDER | FEATURE_MOVE_INTO;
}
return 0;
}
@NotNull
@Override
public String getTypeName(@NotNull IResource resource) {
return "resource"; //$NON-NLS-1$
}
@Override
public String getResourceDescription(@NotNull IResource resource) {
return "";
}
@Override
public List<DBPDataSourceContainer> getAssociatedDataSources(DBNResource resource) {
return Collections.emptyList();
}
@NotNull
@Override
public String getResourceNodeName(@NotNull IResource resource) {
return resource.getName();
}
@NotNull
@Override
public DBNResource makeNavigatorNode(@NotNull DBNNode parentNode, @NotNull IResource resource) throws CoreException, DBException {
DBNResource node = new DBNResource(parentNode, resource, this);
updateNavigatorNode(node, resource);
return node;
}
@Override
public void updateNavigatorNode(@NotNull DBNResource node, @NotNull IResource resource) {
}
@Override
public void openResource(@NotNull IResource resource) throws CoreException, DBException {
System.out.println("Open resource " + resource);
}
}
#Properties file for org.jkiss.dbeaver.runtime.ide.core.tests
# DBeaver - Universal Database Manager
# Copyright (C) 2010-2020 DBeaver Corp and others
# Copyright (C) 2017 Alexander Fedorov (alexander.fedorov@jkiss.org)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Bundle-Vendor = JKISS
Bundle-Name = DBeaver Runtime IDE Core Tests
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jkiss.dbeaver</groupId>
<artifactId>dbeaver</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<artifactId>org.jkiss.dbeaver.runtime.ide.core.tests</artifactId>
<version>4.2.2-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jkiss.dbeaver.test.suite
Bundle-SymbolicName: org.jkiss.dbeaver.test.platform
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
......
......@@ -9,7 +9,7 @@
<version>1.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>org.jkiss.dbeaver.test.suite</artifactId>
<artifactId>org.jkiss.dbeaver.test.platform</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
......
......@@ -16,7 +16,7 @@
* limitations under the License.
*/
package org.jkiss.dbeaver.runtime.ide.core;
package org.jkiss.dbeaver.test.platform;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.junit.After;
......@@ -37,7 +37,7 @@ public class PlatformTest {
public void testPlatformPresence() {
try {
String infoDetails = DBWorkbench.getPlatform().getApplication().getInfoDetails();
System.out.println(infoDetails);
System.out.println("DBeaver application: " + infoDetails);
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -16,12 +16,13 @@
* limitations under the License.
*/
package org.jkiss.dbeaver.runtime.ide.core;
package org.jkiss.dbeaver.test.platform;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.jkiss.dbeaver.runtime.resource.WorkspaceResources;
import org.junit.*;
import org.junit.rules.TemporaryFolder;
......
......@@ -14,7 +14,9 @@
<packaging>pom</packaging>
<modules>
<module>dbeaver.test.suite</module>
<module>org.jkiss.dbeaver.headless</module>
<module>org.jkiss.dbeaver.test.platform</module>
<module>org.jkiss.dbeaver.ext.postgresql.test</module>
<module>org.jkiss.dbeaver.ext.test</module>
</modules>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册