mirror of https://github.com/apache/kafka.git
KAFKA- 12834 : Removed Deprecated method under MockProcessorContext (#16778)
Reviewers: Josep Prat <josep.prat@aiven.io>, Matthias J. Sax <matthias@confluent.io>
This commit is contained in:
parent
8db80d1f07
commit
865cdfc1cd
|
@ -375,18 +375,6 @@ public class MockProcessorContext implements ProcessorContext, RecordCollector.S
|
|||
this.headers = headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* The context exposes this metadata for use in the processor. Normally, they are set by the Kafka Streams framework,
|
||||
* but for the purpose of driving unit tests, you can set it directly. Setting this attribute doesn't affect the others.
|
||||
*
|
||||
* @param timestamp A record timestamp
|
||||
* @deprecated Since 3.0.0; use {@link MockProcessorContext#setRecordTimestamp(long)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings({"WeakerAccess", "unused"})
|
||||
public void setTimestamp(final long timestamp) {
|
||||
this.recordTimestamp = timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* The context exposes this metadata for use in the processor. Normally, they are set by the Kafka Streams framework,
|
||||
|
@ -451,7 +439,7 @@ public class MockProcessorContext implements ProcessorContext, RecordCollector.S
|
|||
@Override
|
||||
public long timestamp() {
|
||||
if (recordTimestamp == null) {
|
||||
throw new IllegalStateException("Timestamp must be set before use via setRecordMetadata() or setTimestamp().");
|
||||
throw new IllegalStateException("Timestamp must be set before use via setRecordMetadata() or setRecordTimestamp().");
|
||||
}
|
||||
return recordTimestamp;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue