Skip to content

NamedPipeStreamReader might read in two messages as one #333

Description

Example functional test failure:

1) Failed : GVFS.FunctionalTests.Tests.EnlistmentPerTestCase.CaseOnlyFolderRenameTests.CaseRenameFoldersAndRemountAndRenameAgain()
Unmounting...Failed. Run 'gvfs log /GVFS.FT/test/3449aa1662704686a6a4' for more info.
Unrecognized response to unmount: AckComplete
  Expected: 0
  But was:  3
   at GVFS.Tests.Should.ValueShouldExtensions.ShouldEqual[T](T actualValue, T expectedValue, String message) in /Users/wilbaker/Repos/VFSForGit/src/GVFS/GVFS.Tests/Should/ValueShouldExtensions.cs:line 34
   at GVFS.FunctionalTests.Tools.GVFSProcess.CallGVFS(String args, Boolean failOnError) in /Users/wilbaker/Repos/VFSForGit/src/GVFS/GVFS.FunctionalTests/Tools/GVFSProcess.cs:line 109
   at GVFS.FunctionalTests.Tools.GVFSProcess.Unmount() in /Users/wilbaker/Repos/VFSForGit/src/GVFS/GVFS.FunctionalTests/Tools/GVFSProcess.cs:line 76
   at GVFS.FunctionalTests.Tools.GVFSFunctionalTestEnlistment.UnmountGVFS() in /Users/wilbaker/Repos/VFSForGit/src/GVFS/GVFS.FunctionalTests/Tools/GVFSFunctionalTestEnlistment.cs:line 227
   at GVFS.FunctionalTests.Tests.EnlistmentPerTestCase.CaseOnlyFolderRenameTests.CaseRenameFoldersAndRemountAndRenameAgain() in /Users/wilbaker/Repos/VFSForGit/src/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs:line 56

I suspect this is due to the change to reading messages with NamedPipeStreamReader.ReadMessage instead of ReadLine. If there are two messages in the stream and ReadMessage reads in both at once it looks like it will combine them into a single message.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions