Skip to content

Commit 0a876bf

Browse files
committed
remove growablearray from test
1 parent 3caf8b4 commit 0a876bf

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

opentelemetry-sdk/src/logs/record.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -215,24 +215,19 @@ mod tests {
215215
let attributes = vec![(Key::new("key"), AnyValue::String("value".into()))];
216216
log_record.add_attributes(attributes.clone());
217217

218-
let mut expected_attributes = AttributesGrowableArray::new();
219218
for (key, value) in attributes {
220-
expected_attributes.push(Some((key, value)));
219+
assert!(log_record.attributes_contains(&key, &value));
221220
}
222-
assert_eq!(log_record.attributes, expected_attributes);
223221
}
224222

225223
#[test]
226224
fn test_set_attribute() {
227225
let mut log_record = LogRecord::default();
228226
log_record.add_attribute("key", "value");
229227

230-
let expected_attributes = {
231-
let mut hybrid_vec = AttributesGrowableArray::new();
232-
hybrid_vec.push(Some((Key::new("key"), AnyValue::String("value".into()))));
233-
hybrid_vec
234-
};
235-
assert_eq!(log_record.attributes, expected_attributes);
228+
let key = Key::new("key");
229+
let value = AnyValue::String("value".into());
230+
assert!(log_record.attributes_contains(&key, &value));
236231
}
237232

238233
#[test]

0 commit comments

Comments
 (0)