-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Java 9 Concurrency Cookbook, Second Edition
By :

MultithreadedTC
is a Java library for testing concurrent applications. Its main objective is to solve the problem of concurrent applications being non-deterministic. You can't control the order of execution of the different threads that form the application. For this purpose, it includes an internal metronome. These testing threads are implemented as methods of a class.
In this recipe, you will learn how to use the MultithreadedTC
library to implement a test for LinkedTransferQueue
.
Download the MultithreadedTC library from https://code.google.com/archive/p/multithreadedtc/ and the JUnit library, version 4.10, from http://junit.org/junit4/. Add the junit-4.10.jar
and MultithreadedTC-1.01.jar
files to the libraries of the project.
Follow these steps to implement the example:
ProducerConsumerTest
that extends the MultithreadedTestCase
class:public class ProducerConsumerTest extends MultithreadedTestCase...