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:
Nancy 2024-08-30 05:08:52 +05:30 committed by GitHub
parent 8db80d1f07
commit 865cdfc1cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 13 deletions

View File

@ -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;
}