You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2024/12/04 08:15:18 UTC
(avro-rs) branch issue-53-debug-failing-test created (now 80a8e0a)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a change to branch issue-53-debug-failing-test
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
at 80a8e0a Issue #53 - Panic to get the stacktrace of an intermittent test failure
This branch includes the following new commits:
new 80a8e0a Issue #53 - Panic to get the stacktrace of an intermittent test failure
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(avro-rs) 01/01: Issue #53 - Panic to get the stacktrace of an intermittent test failure
Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch issue-53-debug-failing-test
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit 80a8e0a0f7caa3df4ededf86c0a84c9fb6a2fb7b
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Wed Dec 4 10:13:34 2024 +0200
Issue #53 - Panic to get the stacktrace of an intermittent test failure
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
avro/src/types.rs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/avro/src/types.rs b/avro/src/types.rs
index 8b8090d..7313efc 100644
--- a/avro/src/types.rs
+++ b/avro/src/types.rs
@@ -458,6 +458,17 @@ impl Value {
(&Value::Double(_), &Schema::Double) => None,
(&Value::Bytes(_), &Schema::Bytes) => None,
(&Value::Bytes(_), &Schema::Decimal { .. }) => None,
+ (Value::Bytes(bytes), &Schema::Uuid) => {
+ panic!("Debugging");
+ // if bytes.len() == 16 {
+ // None
+ // } else {
+ // Some(format!(
+ // "Uuid must be Bytes with length '16', not '{}'!",
+ // bytes.len()
+ // ))
+ // }
+ }
(&Value::String(_), &Schema::String) => None,
(&Value::String(_), &Schema::Uuid) => None,
(&Value::Fixed(n, _), &Schema::Fixed(FixedSchema { size, .. })) => {
@@ -491,6 +502,16 @@ impl Value {
}
// TODO: check precision against n
(&Value::Fixed(_n, _), &Schema::Decimal { .. }) => None,
+ // (&Value::Fixed(size, _), &Schema::Uuid) => {
+ // if size == 16 {
+ // None
+ // } else {
+ // Some(format!(
+ // "Uuid must be Fixed with size '16', not '{}'!",
+ // size
+ // ))
+ // }
+ // }
(Value::String(s), Schema::Enum(EnumSchema { symbols, .. })) => {
if !symbols.contains(s) {
Some(format!("'{s}' is not a member of the possible symbols"))