Skip to content

Commit

Permalink
disable MAEv4 emission by default (#291)
Browse files Browse the repository at this point in the history
* disable MAEv4 emission by default

* fix tests

* fix test

* fix test

---------

Co-authored-by: Jesse Jia <[email protected]>
  • Loading branch information
zhixuanjia and Jesse Jia authored Aug 17, 2023
1 parent 17f4142 commit ddd3f0d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static class AspectUpdateLambda<ASPECT extends RecordTemplate> {
// Enable updating multiple aspects within a single transaction
private boolean _enableAtomicMultipleUpdate = false;

private boolean _emitAuditEvent = true;
private boolean _emitAuditEvent = false;

private Clock _clock = Clock.systemUTC();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ public void setup() {
_mockTrackingManager = mock(BaseTrackingManager.class);
_mockTransactionRunner = spy(DummyTransactionRunner.class);
_dummyLocalDAO = new DummyLocalDAO(_mockGetLatestFunction, _mockEventProducer, _mockTransactionRunner);
_dummyLocalDAO.setEmitAuditEvent(true);
_dummyAuditStamp = makeAuditStamp("foo", 1234);
}

Expand Down Expand Up @@ -311,6 +312,7 @@ public void testMAEv5WithTracking() throws URISyntaxException {
IngestionTrackingContext mockTrackingContext = mock(IngestionTrackingContext.class);
DummyLocalDAO dummyLocalDAO = new DummyLocalDAO(_mockGetLatestFunction, _mockTrackingEventProducer, _mockTrackingManager,
_dummyLocalDAO._transactionRunner);
dummyLocalDAO.setEmitAuditEvent(true);
dummyLocalDAO.setAlwaysEmitAuditEvent(true);
dummyLocalDAO.setEmitAspectSpecificAuditEvent(true);
dummyLocalDAO.setAlwaysEmitAspectSpecificAuditEvent(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ private <URN extends Urn> EbeanLocalDAO<EntityAspectUnion, URN> createDao(@Nonnu
if (urnClass == BarUrn.class) {
dao.setUrnPathExtractor((UrnPathExtractor<URN>) new BarUrnPathExtractor());
}
dao.setEmitAuditEvent(true);
return dao;
}

Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.3.*
version=0.4.*

0 comments on commit ddd3f0d

Please sign in to comment.