Skip to content
Snippets Groups Projects
Unverified Commit ffd86d1f authored by Martin Weise's avatar Martin Weise
Browse files

Fixed the tests

parent cd631d7e
No related branches found
No related tags found
2 merge requests!163Relase 1.3.0,!146Resolve "Remove old queries"
......@@ -199,7 +199,7 @@ public class QueueServiceIntegrationTest extends BaseUnitTest {
}
@Test
public void restore_succeeds() throws AmqpException, IOException, InterruptedException {
public void restore_succeeds() throws AmqpException, IOException {
/* mock */
when(tableRepository.findAll())
......@@ -207,7 +207,6 @@ public class QueueServiceIntegrationTest extends BaseUnitTest {
/* test */
messageQueueService.restore();
Thread.sleep(5 * 1000);
final List<ConsumerDto> response = rabbitMqConfig.findAllConsumers();
assertEquals(amqpConfig.getAmqpConsumers(), (int) response.stream().filter(c -> c.getQueue().getName().equals(TABLE_1_QUEUE_NAME)).count());
}
......
......@@ -17,6 +17,7 @@ import com.rabbitmq.client.Channel;
import lombok.extern.log4j.Log4j2;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -93,6 +94,12 @@ public class ViewServiceIntegrationTest extends BaseUnitTest {
DockerConfig.removeAllNetworks();
}
@BeforeEach
public void beforeEach() {
DATABASE_1.setTables(List.of(TABLE_1, TABLE_2, TABLE_3, TABLE_7));
DATABASE_1.setViews(List.of(VIEW_3));
}
@Test
public void create_viewJoinOnView_succeeds() throws DatabaseNotFoundException, UserNotFoundException,
DatabaseConnectionException, ViewMalformedException, QueryMalformedException, SQLException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment