You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Andrew de Andrade (JIRA)" <ji...@apache.org> on 2015/01/30 04:14:34 UTC
[jira] [Updated] (THRIFT-2959) nodejs: fix binary unit tests
[ https://issues.apache.org/jira/browse/THRIFT-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew de Andrade updated THRIFT-2959:
--------------------------------------
Attachment: thrift-2959-nodejs-fix-binary-unit-tests.patch
Binary unit tests were not being run because they were called with the node binary instead of the nodeunit binary. The first commit gets the binary unit tests working again.
The second commit switches from using nodeunit's equal check that only performs loose equals (==) check instead of strict equals (===) check. This uncovers a potential source of bugs in readByte, which previously could return an array with a byte in it. This function is almost invariably used to read the type of things (message, field, etc.) so endianness behavior should always be big endian (network order), reading from the beginning of a bytearray.
This function is still polymorphic (accepting both a byte and a bytearray), but fixing that will be the focus of another patch since it will involve fixing call sites.
> nodejs: fix binary unit tests
> -----------------------------
>
> Key: THRIFT-2959
> URL: https://issues.apache.org/jira/browse/THRIFT-2959
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Library
> Environment: Trusty64 Vagrant Box
> Reporter: Andrew de Andrade
> Priority: Minor
> Attachments: thrift-2959-nodejs-fix-binary-unit-tests.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)