<commit_before>package io.scalecube.services;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import io.scalecube.services.discovery.ScalecubeServiceDiscovery;
import io.scalecube.services.sut.GreetingRequest;
import io.scalecube.services.sut.GreetingResponse;
import io.scalecube.services.sut.GreetingService;
import io.scalecube.services.sut.GreetingServiceImpl;
import java.time.Duration;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.EmitterProcessor;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;

public class ServiceLocalTest extends BaseTest {

  private static final Duration timeout = Duration.ofSeconds(3);

  private static AtomicInteger port = new AtomicInteger(7000);

  private Microservices microservices;

  /** Setup. */
  @BeforeEach
  public void setUp() {
    microservices =
        Microservices.builder()
            .discovery(
                serviceEndpoint ->
                    new ScalecubeServiceDiscovery(serviceEndpoint)
                        .options(opts -> opts.port(port.incrementAndGet())))
            .transport(ServiceTransports::rsocketServiceTransport)
            .services(new GreetingServiceImpl())
            .startAwait();
  }

  /** Cleanup. */
  @AfterEach
  public void cleanUp() {
    if (microservices != null) {
      microservices.shutdown().block(timeout);
    }
  }

  @Test<commit_msg>local tests do not need transport and discovery<commit_after>package io.scalecube.services;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import io.scalecube.services.sut.GreetingRequest;
import io.scalecube.services.sut.GreetingResponse;
import io.scalecube.services.sut.GreetingService;
import io.scalecube.services.sut.GreetingServiceImpl;
import java.time.Duration;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.EmitterProcessor;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;

public class ServiceLocalTest extends BaseTest {

  private static final Duration timeout = Duration.ofSeconds(3);

  private Microservices microservices;

  /** Setup. */
  @BeforeEach
  public void setUp() {
    microservices = Microservices.builder().services(new GreetingServiceImpl()).startAwait();
  }

  /** Cleanup. */
  @AfterEach
  public void cleanUp() {
    if (microservices != null) {
      microservices.shutdown().block(timeout);
    }
  }

  @Test
{'fraction_non_alphanumeric': 0.10302830809743252, 'fraction_numerical': 0.0019749835418038184, 'mean_word_length': 4.312937062937063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1218795', 'n_tokens_mistral': 914, 'n_tokens_neox': 893, 'n_words': 163}