public void run() { try { while (!testStatus.isStopTestRequested()) { TCObjectSelf tcoSelf = factory.newTCObjectSelf(); serverMapLocalCache.put(tcoSelf); writeTps.incrementAndGet(); } } catch (Throwable t) { testStatus.requestStopWithError(t); } }
public void run() { try { while (!testStatus.isStopTestRequested()) { long oid = random.nextInt((int) factory.getOidCounter().get()); TCObjectSelf tcoSelf = serverMapLocalCache.getFromTCObjectSelfStore(oid); if (tcoSelf != null) { nonNullReadsCounter.incrementAndGet(); Assert.assertEquals(oid, tcoSelf.getOid()); Assert.assertEquals(factory.getKeyForId(tcoSelf.getOid()), tcoSelf.getKey()); Assert.assertEquals(factory.getValueForId(tcoSelf.getOid()), tcoSelf.getValue()); } readTps.incrementAndGet(); } } catch (Throwable e) { testStatus.requestStopWithError(e); } }