Skip to content

MINOR: remove unused code from MessageTest#9961

Merged
chia7712 merged 3 commits intoapache:trunkfrom
chia7712:MINOR-9961
Jan 26, 2021
Merged

MINOR: remove unused code from MessageTest#9961
chia7712 merged 3 commits intoapache:trunkfrom
chia7712:MINOR-9961

Conversation

@chia7712
Copy link
Copy Markdown
Member

noticed this issue when reviewing #9960

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

StringBuilder bld = new StringBuilder();
while (alt.hasRemaining()) {
bld.append(String.format(" %02x", alt.get()));
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this meant to be used in an assert that checks the buffer content?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was unused when it was added by 0de61a4#diff-02a860dc8bbf9772338aaa85b35914b812577d05384eca3af4f5ddb8b5bda4bdR887

        message.write(byteBufferAccessor, cache, version);
         ByteBuffer alt = buf.duplicate();
         alt.flip();
         StringBuilder bld = new StringBuilder();
         while (alt.hasRemaining()) {
             bld.append(String.format(" %02x", alt.get()));
         }
         assertEquals("Expected the serialized size to be " + size +
             ", but it was " + buf.position(), size, buf.position());

Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@chia7712
Copy link
Copy Markdown
Member Author

Build / JDK 15 / org.apache.kafka.clients.consumer.internals.ConsumerNetworkClientTest.blockWhenPollConditionNotSatisfied()
Build / JDK 15 / org.apache.kafka.clients.consumer.internals.FetcherTest.testEarlierOffsetResetArrivesLate()
Build / JDK 15 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationSSLTest.testOneWayReplicationWithAutoOffsetSync()

unrelated error

@chia7712 chia7712 merged commit 0c6bb3d into apache:trunk Jan 26, 2021
ijuma added a commit to ijuma/kafka that referenced this pull request Jan 26, 2021
…e-allocations-lz4

* apache-github/trunk: (562 commits)
  MINOR: remove unused code from MessageTest (apache#9961)
  MINOR: Fix visibility of Log.{unflushedMessages, addSegment} methods (apache#9966)
  KAFKA-12229: Restore original class loader in integration tests using EmbeddedConnectCluster during shutdown  (apache#9942)
  KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems (apache#9947)
  MINOR: Remove `toStruct` and `fromStruct` methods from generated protocol classes (apache#9960)
  MINOR: Fix typo in Utils#toPositive (apache#9943)
  MINOR: MessageUtil: remove some deadcode (apache#9931)
  MINOR: Update zstd-jni to 1.4.8-2 (apache#9957)
  MINOR: Revert assertion in MockProducerTest (apache#9956)
  MINOR: Optimize assertions in unit tests (apache#9955)
  MINOR: Tag `RaftEventSimulationTest` as `integration` and tweak it (apache#9925)
  MINOR: Update to Gradle 6.8.1 (apache#9953)
  MINOR: A few small group coordinator cleanups (apache#9952)
  MINOR: Upgrade ducktape to version 0.8.1  (apache#9933)
  MINOR: fix record time in test shouldWipeOutStandbyStateDirectoryIfCheckpointIsMissing (apache#9948)
  MINOR: Restore interrupt status when closing (apache#9863)
  KAFKA-10357: Extract setup of repartition topics from Streams partition assignor (apache#9848)
  KAFKA-12212; Bump Metadata API version to remove `ClusterAuthorizedOperations` fields (KIP-700) (apache#9945)
  MINOR: log 2min processing summary of StreamThread loop (apache#9941)
  MINOR: Drop enable.metadata.quorum config (apache#9934)
  ...
@chia7712 chia7712 deleted the MINOR-9961 branch March 25, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants