Binary tests check conditions not part of the API contract
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.6k
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 33
Descripción
`TestBinary#testConstantCopy` validates that when the backing buffer for a `Binary` is changed, the changes can be seen when calling either `Binary#getBytes` or `Binary#getBytesUnsafe`. This is not a part of the API contract for constant binary. The API guarantees the opposite: that if a reused buffer changes then those changes won't affect the value already returned by `getBytes`.
`ByteBufferBackedBinary` caches the value returned by `getBytes`, which is allowed in the API. This causes tests to fail when it is expected that a change to the underlying buffer changes the value of the binary, when the contract for constant buffers is that the underlying buffer will not be changed.
**Reporter**: [Ryan Blue](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rdblue) / @rdblue
**Note**: *This issue was originally created as [PARQUET-414](https://issues.apache.org/jira/browse/PARQUET-414). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza por BinaryTest#testConstantCopy e inspecciona el comportamiento de la API de Binary y ByteBufferBackedBinary descrito en el issue. Ejecuta las pruebas binarias y luego ajusta la prueba al contrato del búfer constante para que no se espere que los valores almacenados en caché cambien cuando se modifique un búfer subyacente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- testing
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100