Modifier and Type | Method and Description |
---|---|
Statement |
apply(Statement base,
Description description) |
void |
checkIfAnySubscriptionExists(java.lang.String project,
Duration timeoutDuration)
Check if topics exist.
|
static TestPubsub |
create()
Creates an instance of this rule.
|
void |
publish(java.util.List<PubsubMessage> messages)
Publish messages to
topicPath() . |
PubsubClient.TopicPath |
topicPath()
Topic path where events will be published to.
|
public static TestPubsub create()
Loads GCP configuration from TestPipelineOptions
.
public Statement apply(Statement base, Description description)
public PubsubClient.TopicPath topicPath()
public void publish(java.util.List<PubsubMessage> messages) throws java.io.IOException
topicPath()
.java.io.IOException
public void checkIfAnySubscriptionExists(java.lang.String project, Duration timeoutDuration) throws java.lang.InterruptedException, java.lang.IllegalArgumentException, java.io.IOException, java.util.concurrent.TimeoutException
project
- GCP project identifier.timeoutDuration
- Joda duration that sets a period of time before checking times out.java.lang.InterruptedException
java.lang.IllegalArgumentException
java.io.IOException
java.util.concurrent.TimeoutException