Skip to content

Commit

Permalink
objectionary#3058: violations
Browse files Browse the repository at this point in the history
  • Loading branch information
levBagryansky committed Apr 26, 2024
1 parent 552d360 commit 3f43650
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,16 @@
package org.eolang.maven.hash;

import com.yegor256.WeAreOnline;
import org.cactoos.Scalar;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.cactoos.experimental.Threads;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

/**
* Test case for {@link ChRemote}.
* @since 0.26
Expand Down Expand Up @@ -77,12 +75,14 @@ void isThreadSafe() {
final int threads = 200;
final String sample = new ChRemote("0.23.19").value();
MatcherAssert.assertThat(
StreamSupport.stream(new Threads<>(
threads,
Stream.generate(
() -> new ChRemote("0.23.19")
).limit(threads).collect(Collectors.toList())
).spliterator(), false)
"You can use this class concurrently",
StreamSupport.stream(
new Threads<>(
threads,
Stream.generate(
() -> new ChRemote("0.23.19")
).limit(threads).collect(Collectors.toList())
).spliterator(), false)
.filter(str -> !sample.equals(str))
.collect(Collectors.toList()),
Matchers.empty()
Expand Down

0 comments on commit 3f43650

Please sign in to comment.