Skip to content

Commit

Permalink
remove unuse code (#13036)
Browse files Browse the repository at this point in the history
Co-authored-by: songxiaosheng <[email protected]>
  • Loading branch information
wxbty and songxiaosheng authored Sep 12, 2023
1 parent 52250b8 commit e887bab
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 53 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ public void addListener(MetricsListener<?> listener) {
@Override
@SuppressWarnings({"rawtypes", "unchecked"})
public void publishEvent(MetricsEvent event) {
if (event instanceof EmptyEvent) {
return;
}

if (validateIfApplicationConfigExist(event)) return;
for (MetricsListener listener : listeners) {
if (listener.isSupport(event)) {
Expand Down Expand Up @@ -75,9 +71,6 @@ public void publishErrorEvent(TimeCounterEvent event) {
@SuppressWarnings({"rawtypes"})
private void publishTimeEvent(MetricsEvent event, Consumer<MetricsLifeListener> consumer) {
if (validateIfApplicationConfigExist(event)) return;
if (event instanceof EmptyEvent) {
return;
}
if (event instanceof TimeCounterEvent) {
((TimeCounterEvent) event).getTimePair().end();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ public void onEvent(MetricsEvent event) {
}


@Test
void testPublishEvent() {

// emptyEvent do nothing
MetricsEvent emptyEvent = EmptyEvent.instance();
eventMulticaster.publishEvent(emptyEvent);
Assertions.assertSame(obj, objects[0]);

}

@Test
void testPublishFinishEvent() {

Expand Down

0 comments on commit e887bab

Please sign in to comment.