mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
Explain test subtlety
This commit is contained in:
parent
9d32cbcf50
commit
997da6882a
@ -452,6 +452,10 @@ TEST_CASE("/flow/FlatBuffers/VectorRef") {
|
||||
serializedVector = StringRef(readerArena, writer.toStringRef());
|
||||
}
|
||||
ArenaObjectReader reader(readerArena, serializedVector, Unversioned());
|
||||
// The VectorRef and Arena arguments are intentionally in a different order from the serialize call above.
|
||||
// Arenas need to get serialized after any Ref types whose memory they own. In order for schema evolution to be
|
||||
// possible, it needs to be okay to reorder an Arena so that it appears after a newly added Ref type. For this
|
||||
// reason, Arenas are ignored by the wire protocol entirely. We test that behavior here.
|
||||
reader.deserialize(FileIdentifierFor<decltype(outVec)>::value, outVec, vecArena);
|
||||
}
|
||||
ASSERT(src.size() == outVec.size());
|
||||
|
Loading…
x
Reference in New Issue
Block a user