Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

QueueFileTest.testSaturatedFileExpansionMovesElements hanged #207

Open
realvalkyrie opened this issue May 18, 2019 · 3 comments
Open

QueueFileTest.testSaturatedFileExpansionMovesElements hanged #207

realvalkyrie opened this issue May 18, 2019 · 3 comments

Comments

@realvalkyrie
Copy link

modified variable QueueFile.INITIAL_LENGTH from 4096 to 2048 , then run the test

channel.transferTo(headerLength, count, channel) != count

get hanged

@realvalkyrie
Copy link
Author

here is the env:

  • macos high sierra 10.13.6 (17G7024)
  • java version "1.8.0_201"

when i modified code like this , it worked

      ByteBuffer tmpBuffer = ByteBuffer.allocate((int) byteCount);
      channel.read(tmpBuffer, FILE_HEADER_BYTE_LENGTH);
      tmpBuffer.flip();

      if (channel.write(tmpBuffer, legacyFileLength) != byteCount) {
        throw new AssertionError("Copied insufficient number of bytes!");
      }

@f2prateek
Copy link
Collaborator

Hmmm... wasn’t quite able to reproduce this. Can you send the example as a failing test case?

@realvalkyrie
Copy link
Author

Hmmm... wasn’t quite able to reproduce this. Can you send the example as a failing test case?

modified : QueueFile.INITIAL_LENGTH from 4096 to 2048
run the test : QueueFileTest.testSaturatedFileExpansionMovesElements

the world stoped...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants