Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
Signed-off-by: pierantoniomerlino <[email protected]>
  • Loading branch information
pierantoniomerlino committed Sep 2, 2024
1 parent 5d938e3 commit da1e38d
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.kura.db.h2db.provider.test
Bundle-SymbolicName: org.eclipse.kura.db.h2db.provider.test;singleton:=true
Bundle-Version: 6.0.0.qualifier
Bundle-Vendor: Eclipse Kura
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Import-Package: org.apache.felix.service.command;version="1.0.0",
org.eclipse.kura;version="[1.7,2.0)",
org.eclipse.kura.configuration;version="[1.2,2.0)",
org.eclipse.kura.core.testutil.service;version="[1.0,2.0)",
org.eclipse.kura.db;version="2.0.0",
org.junit;version="4.12.0",
org.mockito;version="4.8.1",
org.mockito.invocation;version="4.8.1",
org.mockito.stubbing;version="4.8.1",
org.osgi.framework;version="1.10.0"
Fragment-Host: org.eclipse.kura.db.h2db.provider
36 changes: 36 additions & 0 deletions kura/test/org.eclipse.kura.db.h2db.provider.test/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>November 30, 2017</p>
<h3>License</h3>

<p>
The Eclipse Foundation makes available all content in this plug-in
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>

<p>
If you did not receive this Content directly from the Eclipse
Foundation, the Content is being redistributed by another party
(&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the
Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
</p>

</body>
</html>
20 changes: 20 additions & 0 deletions kura/test/org.eclipse.kura.db.h2db.provider.test/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2022 Eurotech and/or its affiliates and others
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Eurotech
#

bin.includes = .,\
META-INF/,\
about.html
source.. = src/main/java/
additional.bundles = org.eclipse.kura.api,\
slf4j.api,\
org.apache.logging.log4j.api
67 changes: 67 additions & 0 deletions kura/test/org.eclipse.kura.db.h2db.provider.test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 Eurotech and/or its affiliates and others
This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
Eurotech
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.eclipse.kura</groupId>
<artifactId>test</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>

<artifactId>org.eclipse.kura.db.h2db.provider.test</artifactId>
<packaging>eclipse-test-plugin</packaging>

<properties>
<kura.basedir>${project.basedir}/../..</kura.basedir>
<sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compiletests</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 Eurotech and/or its affiliates and others
* Copyright (c) 2022, 2024 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand All @@ -10,7 +10,7 @@
* Contributors:
* Eurotech
******************************************************************************/
package org.eclipse.kura.core.data.store;
package org.eclipse.kura.internal.db.h2db.provider;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
Expand All @@ -27,7 +27,6 @@
import java.util.Arrays;

import org.eclipse.kura.KuraStoreException;
import org.eclipse.kura.core.db.H2DbMessageStoreImpl;
import org.eclipse.kura.db.H2DbService;
import org.eclipse.kura.message.store.StoredMessage;
import org.eclipse.kura.message.store.provider.MessageStore;
Expand Down
10 changes: 10 additions & 0 deletions kura/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@
<type>p2-installable-unit</type>
<artifactId>org.apache.logging.log4j.core</artifactId>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.kura.db.h2db.provider</artifactId>
</dependency>
</dependencies>
<bundleStartLevel>
<bundle>
Expand Down Expand Up @@ -840,6 +844,11 @@
<id>org.eclipse.kura.emulator.position</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.kura.db.h2db.provider</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
Expand Down Expand Up @@ -956,6 +965,7 @@
<module>org.eclipse.kura.container.provider.test</module>
<module>org.eclipse.kura.ai.triton.server.test</module>
<module>org.eclipse.kura.db.sqlite.provider.test</module>
<module>org.eclipse.kura.db.h2db.provider.test</module>
<module>org.eclipse.kura.message.store.provider.test</module>
<module>org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider.test</module>
<!--
Expand Down

0 comments on commit da1e38d

Please sign in to comment.