Skip to content

Commit

Permalink
Fixed test comparing raw outputs (#61)
Browse files Browse the repository at this point in the history
Fixed test comparing raw outputs (#61)
  • Loading branch information
gr211 authored Apr 29, 2024
1 parent 0c5f747 commit d409879
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,9 @@ where

let partition_key = if self.get_config().print_key {
let key = record_result.partition_key.to_string();
let key = self.write_key(&key);

format!("{} ", key)
Metadata::content(self.write_key(&key))
} else {
"".to_string()
Metadata::Empty
};

let sequence_number = if self.get_config().print_sequence_number {
Expand Down
3 changes: 1 addition & 2 deletions src/sink/console_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ fn format_outputs_raw() {
};

let vec = console.format_record(&record);
let result = String::from_utf8_lossy(vec.as_slice());
assert_eq!(result, "Hello �World\n");
assert_eq!(vec, b"Hello \xF0\x90\x80World\n");
}

#[tokio::test]
Expand Down

0 comments on commit d409879

Please sign in to comment.