Commit f423b374 authored by Noel Alonso's avatar Noel Alonso
Browse files

Restaura funcionalidad de insertar barcos + test

parent b5eab20a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@ public class VesselTrackingController extends CommandGeoController<VesselTrackin
	@KafkaListener(topics = "${broker.topic.realtime.tracking.vessels}")
	public void run(AISTrackingDTO dto) throws InterruptedException {

		// logger.info("Procesando barco: " + dto.getMmsi());
		// vesselService.create(dto);
		logger.info("Procesando barco: " + dto.getMmsi());
		vesselService.create(dto);

		logger.info("Procesando track para el barco: " + dto.getMmsi() + " date: " + dto.getTstamp());
		service.create(dto);
+38 −2
Original line number Diff line number Diff line
package es.redmic.test.vesselscommands.integration.vessel;

/*-@RunWith(SpringJUnit4ClassRunner.class)
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.TimeUnit;

import javax.annotation.PostConstruct;

import org.joda.time.DateTime;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.kafka.annotation.KafkaHandler;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.kafka.support.SendResult;
import org.springframework.kafka.test.rule.EmbeddedKafkaRule;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.concurrent.ListenableFuture;

import es.redmic.brokerlib.avro.geodata.tracking.vessels.AISTrackingDTO;
import es.redmic.brokerlib.listener.SendListener;
import es.redmic.test.vesselscommands.integration.KafkaEmbeddedConfig;
import es.redmic.testutils.kafka.KafkaBaseIntegrationTest;
import es.redmic.vesselscommands.VesselsCommandsApplication;
import es.redmic.vesselslib.dto.vessel.VesselDTO;
import es.redmic.vesselslib.events.vessel.create.CreateVesselEnrichedEvent;

@RunWith(SpringJUnit4ClassRunner.class)
@TestPropertySource(properties = { "spring.kafka.consumer.group-id=CreateVesselFromAIS", "schema.registry.port=18082" })
@SpringBootTest(classes = { VesselsCommandsApplication.class })
@ActiveProfiles("test")
@@ -74,4 +110,4 @@ public class CreateVesselFromAISTest extends KafkaBaseIntegrationTest {
	public void defaultEvent(Object def) {

	}
}-*/
}
 No newline at end of file