This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void correctValuesForConcurrentHasNext() throws ExecutionException, InterruptedException { | |
int exceptionCount = 0; | |
for (int i = 0; i <5000; i++) { | |
Iterator<Integer> syncIterator = new SyncIterator<Integer>( | |
Stream.iterate(0, j -> j + 1).limit(200) | |
.collect(toList()) | |
.iterator()); | |
CountDownLatch startSignal = new CountDownLatch(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void doubleCall() throws IOException { | |
Md5DigestOf md5DigestOf = new Md5DigestOf( | |
new InputOf( | |
new ResourceOf( | |
"org/cactoos/io/DigestEnvelope.class" | |
).stream() | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void correctValuesForConcurrentNext() throws ExecutionException, InterruptedException { | |
for (int i = 0; i < 5000; i++) { | |
final Iterator<String> syncIterator = new SyncIterator<>( | |
new ListOf<>("a", "b") | |
.iterator()); | |
final CountDownLatch startSignal = new CountDownLatch(1); | |
final ExecutorService executors = Executors.newFixedThreadPool(2); | |
final Future<String> letter = executors.submit(() -> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void correctValuesForConcurrentHasNext() throws ExecutionException, InterruptedException { | |
int exceptionCount = 0; | |
for (int i = 0; i <5000; i++) { | |
Iterator<Integer> syncIterator = new SyncIterator<Integer>( | |
Stream.iterate(0, j -> j + 1).limit(200) | |
.collect(toList()) | |
.iterator()); | |
CountDownLatch startSignal = new CountDownLatch(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import io.qameta.allure.Step; | |
import java.io.*; | |
/** | |
* Class for copy logs into Allure | |
*/ | |
public class AllurePrintStream extends PrintStream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>project</groupId> | |
<artifactId>autotests</artifactId> | |
<version>1.0-SNAPSHOT</version> |