Telemetry TEST

This commit is contained in:
Andrew Shvayka 2016-12-05 18:26:18 +02:00
parent b2b2847803
commit 0108d152aa
5 changed files with 17 additions and 12 deletions

View File

@ -197,9 +197,8 @@
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>org.thingsboard.server</groupId>
<groupId>org.thingsboard</groupId>
<artifactId>tools</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.rpc;
package org.thingsboard.server.mqtt;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@ -31,7 +31,7 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.context.WebApplicationContext;
import org.thingsboard.server.rpc.mqtt.MqttRpcIntergrationTest;
import org.thingsboard.server.mqtt.telemetry.MqttTelemetryIntergrationTest;
import java.util.Arrays;
@ -42,7 +42,7 @@ import static org.junit.Assert.assertNotNull;
*/
@ActiveProfiles("default")
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes=MqttRpcIntergrationTest.class, loader=SpringApplicationContextLoader.class)
@ContextConfiguration(classes= MqttTelemetryIntergrationTest.class, loader=SpringApplicationContextLoader.class)
@TestPropertySource("classpath:cassandra-test.properties")
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
@Configuration
@ -50,7 +50,7 @@ import static org.junit.Assert.assertNotNull;
@ComponentScan({"org.thingsboard.server"})
@WebAppConfiguration
@IntegrationTest("server.port:8080")
public class AbstractRpcIntegrationTest {
public class AbstractFeatureIntegrationTest {
@SuppressWarnings("rawtypes")
private HttpMessageConverter mappingJackson2HttpMessageConverter;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.rpc.mqtt;
package org.thingsboard.server.mqtt;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.ClassRule;
@ -27,8 +27,8 @@ import java.util.Arrays;
* @author Valerii Sosliuk
*/
@RunWith(ClasspathSuite.class)
@ClasspathSuite.ClassnameFilters({"org.thingsboard.server.rpc.mqtt.*Test"})
public class MqttRpcSuite {
@ClasspathSuite.ClassnameFilters({"org.thingsboard.server.mqtt.*.*Test"})
public class MqttSuite {
@ClassRule
public static CustomCassandraCQLUnit cassandraUnit =

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.rpc.mqtt;
package org.thingsboard.server.mqtt.telemetry;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.paho.client.mqttv3.MqttAsyncClient;
@ -25,7 +25,7 @@ import org.springframework.web.util.UriComponentsBuilder;
import org.thingsboard.client.tools.RestClient;
import org.thingsboard.server.common.data.Device;
import org.thingsboard.server.common.data.security.DeviceCredentials;
import org.thingsboard.server.rpc.AbstractRpcIntegrationTest;
import org.thingsboard.server.mqtt.AbstractFeatureIntegrationTest;
import java.net.URI;
import java.util.Arrays;
@ -39,7 +39,7 @@ import static org.junit.Assert.assertNotNull;
* @author Valerii Sosliuk
*/
@Slf4j
public class MqttRpcIntergrationTest extends AbstractRpcIntegrationTest {
public class MqttTelemetryIntergrationTest extends AbstractFeatureIntegrationTest {
private static final String MQTT_URL = "tcp://localhost:1883";
private static final String BASE_URL = "http://localhost:8080";

View File

@ -364,6 +364,12 @@
<artifactId>dao</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.thingsboard</groupId>
<artifactId>tools</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.thingsboard</groupId>
<artifactId>dao</artifactId>