Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@

import static org.apache.ignite.events.EventType.EVTS_ALL;
import static org.apache.ignite.events.EventType.EVTS_DISCOVERY_ALL;
import static org.apache.ignite.events.EventType.EVT_JOB_MAPPED;
import static org.apache.ignite.events.EventType.EVT_NODE_FAILED;
import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED;
import static org.apache.ignite.events.EventType.EVT_TASK_FAILED;
import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED;
import static org.apache.ignite.internal.GridTopic.TOPIC_EVENT;
import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT;
import static org.apache.ignite.internal.managers.communication.GridIoPolicy.PUBLIC_POOL;
Expand Down Expand Up @@ -505,7 +508,16 @@ private boolean isHiddenEvent(int type) {
* @return {@code true} if this is an internal event.
*/
private boolean isInternalEvent(int type) {
return type == EVT_DISCOVERY_CUSTOM_EVT || F.contains(EVTS_DISCOVERY_ALL, type);
switch (type) {
case EVT_DISCOVERY_CUSTOM_EVT:
case EVT_TASK_FINISHED:
case EVT_TASK_FAILED:
case EVT_JOB_MAPPED:
return true;

default:
return F.contains(EVTS_DISCOVERY_ALL, type);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void testDisableWithIncludes() throws Exception {
try {
Ignite g = startGrid();

g.events().enableLocal(EVT_TASK_STARTED, EVT_TASK_FINISHED, EVT_JOB_STARTED);
g.events().enableLocal(EVT_TASK_STARTED, EVT_JOB_STARTED);

final AtomicInteger cnt = new AtomicInteger();

Expand All @@ -148,17 +148,17 @@ public void testDisableWithIncludes() throws Exception {

return true;
}
}, EVT_TASK_STARTED, EVT_TASK_FINISHED, EVT_JOB_STARTED);
}, EVT_TASK_STARTED, EVT_JOB_STARTED);

g.compute().run(F.noop());

assertEquals(3, cnt.get());
assertEquals(2, cnt.get());

g.events().disableLocal(EVT_TASK_STARTED, EVT_TASK_FINISHED, EVT_JOB_FAILED);
g.events().disableLocal(EVT_TASK_STARTED, EVT_JOB_FAILED);

g.compute().run(F.noop());

assertEquals(4, cnt.get());
assertEquals(3, cnt.get());
}
finally {
stopAllGrids();
Expand Down