-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[releases/1.2] service: Fix tag deserialization for large messages (#554
) service: Fix tag deserialization for large messages (#552) * tests: Add test cases for big messages (100 fields) * service: Fix tag deserialization for large messages Tags are i32 varints, but we were only deserializing the first byte. Simplify some related details: - Decoding a varint returns the updated position, so we don't need to use encoder._TagSize() - We can directly construct a memory view once instead of constructing a BytesIO for each loop iteration. * tests: Use pytest.approx instead of choosing exactly comparable floats
- Loading branch information
Showing
7 changed files
with
534 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
syntax = "proto3"; | ||
package ni.measurementlink.measurement.tests.v1; | ||
|
||
message BigMessage { | ||
double field1 = 1; | ||
double field2 = 2; | ||
double field3 = 3; | ||
double field4 = 4; | ||
double field5 = 5; | ||
double field6 = 6; | ||
double field7 = 7; | ||
double field8 = 8; | ||
double field9 = 9; | ||
double field10 = 10; | ||
double field11 = 11; | ||
double field12 = 12; | ||
double field13 = 13; | ||
double field14 = 14; | ||
double field15 = 15; | ||
double field16 = 16; | ||
double field17 = 17; | ||
double field18 = 18; | ||
double field19 = 19; | ||
double field20 = 20; | ||
double field21 = 21; | ||
double field22 = 22; | ||
double field23 = 23; | ||
double field24 = 24; | ||
double field25 = 25; | ||
double field26 = 26; | ||
double field27 = 27; | ||
double field28 = 28; | ||
double field29 = 29; | ||
double field30 = 30; | ||
double field31 = 31; | ||
double field32 = 32; | ||
double field33 = 33; | ||
double field34 = 34; | ||
double field35 = 35; | ||
double field36 = 36; | ||
double field37 = 37; | ||
double field38 = 38; | ||
double field39 = 39; | ||
double field40 = 40; | ||
double field41 = 41; | ||
double field42 = 42; | ||
double field43 = 43; | ||
double field44 = 44; | ||
double field45 = 45; | ||
double field46 = 46; | ||
double field47 = 47; | ||
double field48 = 48; | ||
double field49 = 49; | ||
double field50 = 50; | ||
double field51 = 51; | ||
double field52 = 52; | ||
double field53 = 53; | ||
double field54 = 54; | ||
double field55 = 55; | ||
double field56 = 56; | ||
double field57 = 57; | ||
double field58 = 58; | ||
double field59 = 59; | ||
double field60 = 60; | ||
double field61 = 61; | ||
double field62 = 62; | ||
double field63 = 63; | ||
double field64 = 64; | ||
double field65 = 65; | ||
double field66 = 66; | ||
double field67 = 67; | ||
double field68 = 68; | ||
double field69 = 69; | ||
double field70 = 70; | ||
double field71 = 71; | ||
double field72 = 72; | ||
double field73 = 73; | ||
double field74 = 74; | ||
double field75 = 75; | ||
double field76 = 76; | ||
double field77 = 77; | ||
double field78 = 78; | ||
double field79 = 79; | ||
double field80 = 80; | ||
double field81 = 81; | ||
double field82 = 82; | ||
double field83 = 83; | ||
double field84 = 84; | ||
double field85 = 85; | ||
double field86 = 86; | ||
double field87 = 87; | ||
double field88 = 88; | ||
double field89 = 89; | ||
double field90 = 90; | ||
double field91 = 91; | ||
double field92 = 92; | ||
double field93 = 93; | ||
double field94 = 94; | ||
double field95 = 95; | ||
double field96 = 96; | ||
double field97 = 97; | ||
double field98 = 98; | ||
double field99 = 99; | ||
double field100 = 100; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.