Skip to content

Commit

Permalink
Ignored the tests putToCacheAndGetInvalidationEventWhenNodeShutdownWi…
Browse files Browse the repository at this point in the history
…thBinaryInMemoryFormat and putToCacheAndGetInvalidationEventWhenNodeShutdownWithObjectInMemoryFormat as indicated at #9172 (comment)
  • Loading branch information
ihsandemir committed Oct 30, 2016
1 parent 3f41b68 commit 4102c25
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.hazelcast.config.InMemoryFormat;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -70,11 +71,13 @@ public void putToCacheAndUpdateFromOtherNodeThenGetUpdatedFromClientNearCacheWit
}

@Test
@Ignore
public void putToCacheAndGetInvalidationEventWhenNodeShutdownWithBinaryInMemoryFormat() {
putToCacheAndGetInvalidationEventWhenNodeShutdown(InMemoryFormat.BINARY);
}

@Test
@Ignore
public void putToCacheAndGetInvalidationEventWhenNodeShutdownWithObjectInMemoryFormat() {
putToCacheAndGetInvalidationEventWhenNodeShutdown(InMemoryFormat.OBJECT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public void run() throws Exception {
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertTrue(EVENT_COUNT <= eventCount.get());
int count = eventCount.get();
assertTrue("Event count is " + count + " needs to be at least " + EVENT_COUNT, EVENT_COUNT <= count);
}
});

Expand All @@ -114,7 +115,8 @@ public void run() throws Exception {
@Override
public void run()
throws Exception {
assertEquals(EVENT_COUNT, eventCount.get());
int count = eventCount.get();
assertEquals("Event count is " + count + " needs to stay at " + EVENT_COUNT, EVENT_COUNT, count);
}
}, 3);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package com.hazelcast.client.impl.operations;

import com.hazelcast.client.ClientEndpoint;
import com.hazelcast.client.impl.ClientDataSerializerHook;
import com.hazelcast.client.impl.ClientEndpointManagerImpl;
import com.hazelcast.client.impl.ClientEngineImpl;
import com.hazelcast.nio.Connection;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.spi.AbstractOperation;
import com.hazelcast.spi.ClientAwareService;
import com.hazelcast.spi.UrgentSystemOperation;
import com.hazelcast.spi.impl.NodeEngineImpl;
Expand All @@ -31,7 +31,8 @@
import java.util.Collection;
import java.util.Set;

public class ClientDisconnectionOperation extends AbstractClientOperation implements UrgentSystemOperation {
public class ClientDisconnectionOperation extends AbstractOperation
implements UrgentSystemOperation {

private String clientUuid;
private String memberUuid;
Expand Down Expand Up @@ -84,9 +85,4 @@ protected void readInternal(ObjectDataInput in) throws IOException {
clientUuid = in.readUTF();
memberUuid = in.readUTF();
}

@Override
public int getId() {
return ClientDataSerializerHook.CLIENT_DISCONNECT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private final class ClientNearCacheInvalidationListenerImpl implements Invalidat

@Override
public void onInvalidate(Invalidation event) {
if (!endpoint.isAlive()) {
if (!getEndpoint().isAlive()) {
return;
}

Expand All @@ -101,11 +101,11 @@ public void onInvalidate(Invalidation event) {

private void sendEvent(Invalidation event) {
if (event instanceof BatchNearCacheInvalidation) {
List<Data> keys = getKeysExcludingSource(((BatchNearCacheInvalidation) event), endpoint.getUuid());
List<Data> keys = getKeysExcludingSource(((BatchNearCacheInvalidation) event), getEndpoint().getUuid());
if (!isEmpty(keys)) {
sendClientMessage(parameters.name, encodeIMapBatchInvalidationEvent(keys));
}
} else if (!endpoint.getUuid().equals(event.getSourceUuid())) {
} else if (!getEndpoint().getUuid().equals(event.getSourceUuid())) {
if (event instanceof SingleNearCacheInvalidation) {
Data key = ((SingleNearCacheInvalidation) event).getKey();
sendClientMessage(key, encodeIMapInvalidationEvent(key));
Expand Down

0 comments on commit 4102c25

Please sign in to comment.