Skip to content

Conversation

@kylec32
Copy link

@kylec32 kylec32 commented Mar 18, 2020

It feels like the validator is dependent on the order the tests are run. If we use the SHA256 (or any file content based method) as a X-WOPI-ItemVersion and run each test in isolation files.PutFileReturnsDifferentVersion passes fine. It doesn't pass when you run all the tests together because a previous test (files.PutFileReturnsVersion) runs and sets the file to WordSimpleDocument. Then the first request in files.PutFileReturnsDifferentVersion also puts the same file (WordSimpleDocument) but then checks that the X-WOPI-ItemVersion has changed. Since it's the same file the hash doesn't change and the test is marked a failure.

The proposed fix is to not do the first check (and thus the CheckFileInfo call doesn't need to be made) and simply rely on the second PUT request to check if the requirements of the tests are accounted for.

… files.PutFileReturnsDifferentVersion test if the version is based on file content.
@microsoft-github-updates microsoft-github-updates bot changed the base branch from master to main July 21, 2020 22:02
@ydanneg
Copy link

ydanneg commented Jun 2, 2023

I have the same issue.
Due to JPA/Hibernate specifics when updating DB entity with the same data version is not incremented.
Validator tests use the same content on every step and surprisingly expects new version value ¯_(ツ)_/¯

I believe this is a valid scenario, where saving the same content will not change version (or a hash) of a server resource.

Please fix test to at least put some random data to a content used in PutFile tests

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