Skip to content

Commit

Permalink
docs: style
Browse files Browse the repository at this point in the history
  • Loading branch information
stawirej committed Oct 14, 2023
1 parent fd1bac0 commit d127f56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ to manifest concurrency issues.

```java
@RepeatedTest(10)
void Thread_safe_adding_to_list(){
void Thread_safe_adding_to_list() {
// Given
List<String> list = new ArrayList<>(); // <-- NOT thread safe
int threadsCount = Runtime.getRuntime().availableProcessors();
Expand Down Expand Up @@ -44,7 +44,7 @@ but the following element(s) were unexpected:

```java
@RepeatedTest(10)
void Thread_safe_adding_to_list(){
void Thread_safe_adding_to_list() {
// Given
List<String> list = Collections.synchronizedList(new ArrayList<>()); // <-- thread safe
int threadsCount = Runtime.getRuntime().availableProcessors();
Expand All @@ -68,9 +68,9 @@ void Thread_safe_adding_to_list(){

```java
@RepeatedTest(10) // run test multiple times to increase chance of manifesting concurrency issues
void Adding_unique_apples_is_thread_safe(){
void Adding_unique_apples_is_thread_safe() {
// Given
UniqueApples uniqueApples=UniqueApples.newInstance();
UniqueApples uniqueApples = UniqueApples.newInstance();

// When
try (ThreadsCollider threadsCollider = // use try-with-resources to automatically shutdown threads collider
Expand Down

0 comments on commit d127f56

Please sign in to comment.