Skip to content

Commit

Permalink
Pubsub test client fixup (#25907)
Browse files Browse the repository at this point in the history
* make incoming message public

* add set clock method to test client

* spotless
  • Loading branch information
nickuncaged1201 authored Mar 21, 2023
1 parent 6cb7b8e commit 5f9bf8b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ private static class State {
private static final State STATE = new State();

/** Closing the factory will validate all expected messages were processed. */
public interface PubsubTestClientFactory extends PubsubClientFactory, Closeable, Serializable {}
public interface PubsubTestClientFactory extends PubsubClientFactory, Closeable, Serializable {
default <T> PubsubIO.Read<T> setClock(PubsubIO.Read<T> readTransform, Clock clock) {
return readTransform.withClock(clock);
}
}

/**
* Return a factory for testing publishers. Only one factory may be in-flight at a time. The
Expand Down

0 comments on commit 5f9bf8b

Please sign in to comment.