public class MatsTestHelp
extends java.lang.Object
Constructor and Description |
---|
MatsTestHelp() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
endpoint() |
static java.lang.String |
endpoint(java.lang.String what) |
static java.lang.String |
from() |
static java.lang.String |
from(java.lang.String what) |
static org.slf4j.Logger |
getClassLogger() |
static java.lang.String |
randomId() |
static void |
takeNap(int millis)
Sleeps the specified number of milliseconds - can emulate processing time, primarily meant for the concurrency
tests.
|
static java.lang.String |
terminator() |
static java.lang.String |
terminator(java.lang.String what) |
static java.lang.String |
traceId() |
public static org.slf4j.Logger getClassLogger()
Thread.currentThread().getStackTrace()
to figure this out).public static java.lang.String endpoint()
"{CallerClassSimpleName.method}.Endpoint"
.public static java.lang.String endpoint(java.lang.String what)
"{CallerClassSimpleName.method}.Endpoint.{what}"
.public static java.lang.String terminator()
"{CallerClassSimpleName.method}.Terminator"
.public static java.lang.String terminator(java.lang.String what)
"{CallerClassSimpleName.method}.Terminator"
.public static java.lang.String traceId()
"{CallerClassSimpleName.method}.traceId.{randomId}"
- BUT PLEASE NOTE!! ALWAYS
use a semantically meaningful, globally unique Id as traceId in production code!public static java.lang.String from()
"{CallerClassSimpleName.method}"
.public static java.lang.String from(java.lang.String what)
"{CallerClassSimpleName.method}.{what}"
.public static java.lang.String randomId()
public static void takeNap(int millis) throws java.lang.AssertionError
millis
- the number of millis to sleepjava.lang.AssertionError
- if an InterruptedException
occurs.