Skip to content

Commit

Permalink
current impl was missing testStepId; add it
Browse files Browse the repository at this point in the history
- note that the tests are not catching the fact that this new field is
  missing from the expected output, because all the tests are doing an
  "included" test, rather than the correct equality; fixing this in a
  later commit

Signed-off-by: mimir-d <[email protected]>
  • Loading branch information
mimir-d committed Oct 8, 2024
1 parent 2e12ab1 commit f7a5696
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 235 deletions.
8 changes: 4 additions & 4 deletions src/output/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ impl StdoutWriter {
}

pub struct JsonEmitter {
sequence_no: Arc<atomic::AtomicU64>,
timezone: chrono_tz::Tz,
writer: WriterType,
seqno: Arc<atomic::AtomicU64>,
}

impl JsonEmitter {
pub(crate) fn new(timezone: chrono_tz::Tz, writer: WriterType) -> Self {
JsonEmitter {
timezone,
writer,
sequence_no: Arc::new(atomic::AtomicU64::new(0)),
seqno: Arc::new(atomic::AtomicU64::new(0)),
}
}

Expand All @@ -110,8 +110,8 @@ impl JsonEmitter {
}

fn next_sequence_no(&self) -> u64 {
self.sequence_no.fetch_add(1, atomic::Ordering::SeqCst);
self.sequence_no.load(atomic::Ordering::SeqCst)
self.seqno.fetch_add(1, atomic::Ordering::SeqCst);
self.seqno.load(atomic::Ordering::SeqCst)
}

pub async fn emit(&self, object: &spec::RootArtifact) -> Result<(), WriterError> {
Expand Down
Loading

0 comments on commit f7a5696

Please sign in to comment.