Skip to content

Commit

Permalink
#417 CR
Browse files Browse the repository at this point in the history
  • Loading branch information
HDouss committed Mar 12, 2020
1 parent 2072e02 commit 0eee14e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/java/com/artipie/rpm/RpmTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
import org.cactoos.iterable.Repeated;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.hamcrest.collection.IsIterableWithSize;
import org.hamcrest.core.IsEqual;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

Expand Down Expand Up @@ -99,20 +101,19 @@ public void addsSingleRpm(@TempDir final Path folder, @TempDir final Path store)
throws Exception {
final String key = "nginx-1.16.1-1.el8.ngx.x86_64.rpm";
final Storage storage = RpmTest.save(folder, store, key);
final Rpm rpm = new Rpm(storage);
final int threads = 10;
MatcherAssert.assertThat(
new Threads<>(
threads,
new Repeated<Scalar<Boolean>>(
threads,
() -> {
rpm.update(key).blockingAwait();
new Rpm(storage).update(key).blockingAwait();
return true;
}
)
),
Matchers.iterableWithSize(threads)
new IsIterableWithSize<>(new IsEqual<>(threads))
);
final Path primary = folder.resolve("primary.xml");
new RxFile(primary).save(
Expand Down

0 comments on commit 0eee14e

Please sign in to comment.