Skip to content

Commit

Permalink
refactor: optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanzalu committed Nov 12, 2024
1 parent 5f8eddb commit f378836
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

import com.google.inject.Inject;
import com.google.inject.Singleton;
import org.icij.datashare.PropertiesProvider;
import org.icij.datashare.asynctasks.Task;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;

import org.icij.datashare.PropertiesProvider;
import org.icij.datashare.asynctasks.Task;


@Singleton
public class TaskManagerMemory extends org.icij.datashare.asynctasks.TaskManagerMemory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
package org.icij.datashare.web;

import java.util.Map;
import java.util.function.Function;
import net.codestory.http.routes.Routes;
import net.codestory.rest.Response;
import net.codestory.rest.RestAssert;
import net.codestory.rest.ShouldChain;
import org.icij.datashare.PropertiesProvider;
import org.icij.datashare.asynctasks.Group;
import org.icij.datashare.asynctasks.Task;
import org.icij.datashare.asynctasks.TaskManager;
import org.icij.datashare.asynctasks.TaskModifier;
import org.icij.datashare.asynctasks.TaskSupplier;
import org.icij.datashare.asynctasks.*;
import org.icij.datashare.asynctasks.bus.amqp.TaskCreation;
import org.icij.datashare.db.JooqRepository;
import org.icij.datashare.extension.PipelineRegistry;
import org.icij.datashare.mode.CommonMode;
import org.icij.datashare.nlp.EmailPipeline;
import org.icij.datashare.session.LocalUserFilter;
import org.icij.datashare.tasks.TaskManagerMemory;
import org.icij.datashare.tasks.*;
import org.icij.datashare.test.DatashareTimeRule;
import org.icij.datashare.text.indexing.Indexer;
Expand All @@ -32,12 +27,10 @@
import org.mockito.Mock;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.*;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.function.Function;

import static java.lang.String.format;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand All @@ -48,12 +41,7 @@
import static org.icij.datashare.cli.DatashareCliOptions.REPORT_NAME_OPT;
import static org.icij.datashare.json.JsonObjectMapper.MAPPER;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.*;
import static org.mockito.MockitoAnnotations.initMocks;

public class TaskResourceTest extends AbstractProdWebServerTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package org.icij.datashare.asynctasks;

import org.icij.datashare.asynctasks.bus.amqp.AmqpConsumer;
import org.icij.datashare.asynctasks.bus.amqp.AmqpInterlocutor;
import org.icij.datashare.asynctasks.bus.amqp.AmqpQueue;
import org.icij.datashare.asynctasks.bus.amqp.CancelEvent;
import org.icij.datashare.asynctasks.bus.amqp.TaskEvent;
import org.icij.datashare.asynctasks.bus.amqp.*;
import org.icij.datashare.tasks.RoutingStrategy;
import org.icij.datashare.user.User;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

import static java.lang.Integer.parseInt;
import static java.util.concurrent.Executors.newSingleThreadExecutor;
import static java.util.stream.Collectors.toList;
import static org.icij.datashare.asynctasks.Task.State.RUNNING;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
import org.icij.datashare.user.User;
import org.icij.extract.redis.RedissonClientFactory;
import org.icij.task.Options;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.*;
import org.redisson.Redisson;
import org.redisson.RedissonMap;
import org.redisson.api.RedissonClient;
Expand All @@ -25,11 +20,7 @@
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;

import static org.fest.assertions.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
package org.icij.datashare.asynctasks;

import static org.fest.assertions.Assertions.assertThat;

import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

import org.icij.datashare.PropertiesProvider;
import org.icij.datashare.test.LogbackCapturingRule;
import org.icij.datashare.user.User;
Expand All @@ -16,6 +9,13 @@
import org.junit.Test;
import org.slf4j.event.Level;

import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

import static org.fest.assertions.Assertions.assertThat;


public class TaskManagerMemoryTest {
@Rule
Expand Down

0 comments on commit f378836

Please sign in to comment.