target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testGetKeyThrowsNullPointerException() throws Throwable { try { transactionManager.getKey(null, 100L); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cann... | protected String getKey (String prefix, long id) { StringBuilder sb = new StringBuilder (getName()); sb.append ('.'); sb.append (prefix); sb.append (Long.toString (id)); return sb.toString (); } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected String getKey (String prefix, long id) { StringBuilder sb = new StringBuilder (getName()); sb.append ('.'); sb.append (prefix); sb.append (Long.toString (id)); return sb.toS... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected String getKey (String prefix, long id) { StringBuilder sb = new StringBuilder (getName()); sb.append ('.'); sb.append (prefix); sb.append (Long.toString (id)); return sb.toS... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected String getKey (String prefix, long id) { StringBuilder sb = new StringBuilder (getName()); sb.append ('.'); sb.append (prefix); sb.append (Long.toString (id)); return sb.toS... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected String getKey (String prefix, long id) { StringBuilder sb = new StringBuilder (getName()); sb.append ('.'); sb.append (prefix); sb.append (Long.toString (id)); return sb.toS... |
@Test public void testGetOutstandingTransactions() throws Throwable { int result = new TransactionManager().getOutstandingTransactions(); assertEquals(-1, result, "result"); } | @Override public int getOutstandingTransactions() { if (iisp instanceof LocalSpace) return ((LocalSpace) iisp).size(queue); return -1; } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public int getOutstandingTransactions() { if (iisp instanceof LocalSpace) return ((LocalSpace) iisp).size(queue); return -1; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public int getOutstandingTransactions() { if (iisp instanceof LocalSpace) return ((LocalSpace) iisp).size(queue); return -1; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public int getOutstandingTransactions() { if (iisp instanceof LocalSpace) return ((LocalSpace) iisp).size(queue); return -1; } @Override void initService(); @Override void ... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public int getOutstandingTransactions() { if (iisp instanceof LocalSpace) return ((LocalSpace) iisp).size(queue); return -1; } @Override void initService(); @Override void ... |
@Test public void testGetParticipantsThrowsNullPointerException() throws Throwable { try { transactionManager.getParticipants("testTransactionManagerGroupName"); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.ge... | protected List<TransactionParticipant> getParticipants (String groupName) { List<TransactionParticipant> participants = groups.get (groupName); if (participants == null) { participants = new ArrayList(); } return participants; } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected List<TransactionParticipant> getParticipants (String groupName) { List<TransactionParticipant> participants = groups.get (groupName); if (participants == null) { participant... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected List<TransactionParticipant> getParticipants (String groupName) { List<TransactionParticipant> participants = groups.get (groupName); if (participants == null) { participant... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected List<TransactionParticipant> getParticipants (String groupName) { List<TransactionParticipant> participants = groups.get (groupName); if (participants == null) { participant... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected List<TransactionParticipant> getParticipants (String groupName) { List<TransactionParticipant> participants = groups.get (groupName); if (participants == null) { participant... |
@Test public void testGetTail() throws Throwable { long result = new TransactionManager().getTail(); assertEquals(0L, result, "result"); } | @Override public long getTail () { return tail; } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public long getTail () { return tail; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public long getTail () { return tail; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public long getTail () { return tail; } @Override void initService(); @Override void startService(); @Override void stopService(); void queue(Serializable context); void pu... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public long getTail () { return tail; } @Override void initService(); @Override void startService(); @Override void stopService(); void queue(Serializable context); void pu... |
@Test public void testUnpackingDate() { try { BERTLVPackager p = new BERTLVBinaryPackager(); p.setFieldPackager(new ISOFieldPackager[]{new IFA_TTLLBINARY()}); ISOMsg m = new ISOMsg(55); p.unpack(m, ISOUtil.hex2byte("9A03020618")); assertEquals("020618", m.getComponent("1").getValue()); } catch (ISOException e) { fail("... | @Override public int unpack(ISOComponent m, byte[] b) throws ISOException { try { return unpack(m, b, false); } catch (RuntimeException e) { throw new ISOException(e); } } | BERTLVPackager extends GenericPackager { @Override public int unpack(ISOComponent m, byte[] b) throws ISOException { try { return unpack(m, b, false); } catch (RuntimeException e) { throw new ISOException(e); } } } | BERTLVPackager extends GenericPackager { @Override public int unpack(ISOComponent m, byte[] b) throws ISOException { try { return unpack(m, b, false); } catch (RuntimeException e) { throw new ISOException(e); } } BERTLVPackager(); } | BERTLVPackager extends GenericPackager { @Override public int unpack(ISOComponent m, byte[] b) throws ISOException { try { return unpack(m, b, false); } catch (RuntimeException e) { throw new ISOException(e); } } BERTLVPackager(); @Override byte[] pack(ISOComponent m); byte[] pack(ISOComponent m, boolean nested, int st... | BERTLVPackager extends GenericPackager { @Override public int unpack(ISOComponent m, byte[] b) throws ISOException { try { return unpack(m, b, false); } catch (RuntimeException e) { throw new ISOException(e); } } BERTLVPackager(); @Override byte[] pack(ISOComponent m); byte[] pack(ISOComponent m, boolean nested, int st... |
@Test public void testInitCounterThrowsNullPointerException() throws Throwable { try { transactionManager.initCounter("testTransactionManagerName", 100L); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessag... | protected long initCounter (String name, long defValue) { Long L = (Long) psp.rdp (name); if (L == null) { L = defValue; psp.out (name, L); } return L; } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long initCounter (String name, long defValue) { Long L = (Long) psp.rdp (name); if (L == null) { L = defValue; psp.out (name, L); } return L; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long initCounter (String name, long defValue) { Long L = (Long) psp.rdp (name); if (L == null) { L = defValue; psp.out (name, L); } return L; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long initCounter (String name, long defValue) { Long L = (Long) psp.rdp (name); if (L == null) { L = defValue; psp.out (name, L); } return L; } @Override void initService()... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long initCounter (String name, long defValue) { Long L = (Long) psp.rdp (name); if (L == null) { L = defValue; psp.out (name, L); } return L; } @Override void initService()... |
@Test public void testInitServiceThrowsNullPointerException() throws Throwable { try { transactionManager.initService(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cann... | @Override public void initService () throws ConfigurationException { queue = cfg.get ("queue", null); if (queue == null) throw new ConfigurationException ("queue property not specified"); sp = SpaceFactory.getSpace (cfg.get ("space")); isp = SpaceFactory.getSpace (cfg.get ("input-space", cfg.get ("space"))); if (isp ==... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void initService () throws ConfigurationException { queue = cfg.get ("queue", null); if (queue == null) throw new ConfigurationException ("queue property not specifie... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void initService () throws ConfigurationException { queue = cfg.get ("queue", null); if (queue == null) throw new ConfigurationException ("queue property not specifie... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void initService () throws ConfigurationException { queue = cfg.get ("queue", null); if (queue == null) throw new ConfigurationException ("queue property not specifie... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void initService () throws ConfigurationException { queue = cfg.get ("queue", null); if (queue == null) throw new ConfigurationException ("queue property not specifie... |
@Test public void testInitTailLockThrowsNullPointerException() throws Throwable { try { transactionManager.initTailLock(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Ca... | protected void initTailLock () { tailLock = TAILLOCK + "." + Integer.toString (this.hashCode()); sp.put (tailLock, TAILLOCK); } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void initTailLock () { tailLock = TAILLOCK + "." + Integer.toString (this.hashCode()); sp.put (tailLock, TAILLOCK); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void initTailLock () { tailLock = TAILLOCK + "." + Integer.toString (this.hashCode()); sp.put (tailLock, TAILLOCK); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void initTailLock () { tailLock = TAILLOCK + "." + Integer.toString (this.hashCode()); sp.put (tailLock, TAILLOCK); } @Override void initService(); @Override void startServ... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void initTailLock () { tailLock = TAILLOCK + "." + Integer.toString (this.hashCode()); sp.put (tailLock, TAILLOCK); } @Override void initService(); @Override void startServ... |
@Test public void testNextIdThrowsNullPointerException() throws Throwable { try { transactionManager.nextId(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot enter s... | protected long nextId () { long h; synchronized (psp) { commitOff (psp); psp.in (HEAD); h = head; psp.out (HEAD, ++head); commitOn (psp); } return h; } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long nextId () { long h; synchronized (psp) { commitOff (psp); psp.in (HEAD); h = head; psp.out (HEAD, ++head); commitOn (psp); } return h; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long nextId () { long h; synchronized (psp) { commitOff (psp); psp.in (HEAD); h = head; psp.out (HEAD, ++head); commitOn (psp); } return h; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long nextId () { long h; synchronized (psp) { commitOff (psp); psp.in (HEAD); h = head; psp.out (HEAD, ++head); commitOn (psp); } return h; } @Override void initService(); ... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected long nextId () { long h; synchronized (psp) { commitOff (psp); psp.in (HEAD); h = head; psp.out (HEAD, ++head); commitOn (psp); } return h; } @Override void initService(); ... |
@Test public void testPrepare10() throws Throwable { HasEntry hasEntry = new HasEntry(); AbstractList<TransactionParticipant> arrayList = new ArrayList(); arrayList.add(new Debug()); int result = transactionManager.prepare(1, 100L, new NotActiveException("testTransactionManagerParam1"), members, arrayList.iterator(), m... | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepare2() throws Throwable { int result = transactionManager.prepare(new CheckPoint(), 100L, Boolean.FALSE); assertEquals(193, result, "result"); } | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepare5() throws Throwable { int result = transactionManager.prepare(1, 100L, new File("testTransactionManagerParam1"), new ArrayList(), new ArrayList( 1000).iterator(), true, new LogEvent("testTransactionManagerTag"), null); assertEquals(TransactionConstants.ABORTED, result, "result"); } | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepare7() throws Throwable { transactionManager = new TransactionManager(); List<TransactionParticipant> members = new ArrayList(); List<TransactionParticipant> arrayList = new ArrayList(); BSHTransactionParticipant bSHTransactionParticipant = new BSHTransactionParticipant(); boolean abort = arra... | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepare8() throws Throwable { AbstractList<TransactionParticipant> arrayList = new ArrayList(1000); arrayList.add(new HasEntry()); LogEvent evt = new LogEvent(); int result = transactionManager.prepare(1, 100L, Boolean.TRUE, new ArrayList(), arrayList.iterator(), false, evt, null); assertEquals(3,... | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepareForAbort1() throws Throwable { int result = transactionManager.prepareForAbort(new Trace(), 100L, new File("testTransactionManagerParam1")); assertEquals(64, result, "result"); } | protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(id, "prepareForAbort", p); return ((AbortParticipant)p).prepareForAbort (id, context); } } catch (Throwable t) { getLog().warn ("PREPARE-F... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... |
@Test public void testSetDetailRequired() throws Throwable { systemMonitor.setDetailRequired(true); assertTrue(systemMonitor.getDetailRequired(), "systemMonitor.getDetailRequired()"); assertTrue(systemMonitor.isModified(), "systemMonitor.isModified()"); } | public synchronized void setDetailRequired(boolean detail) { this.detailRequired = detail; setModified(true); if (me != null) me.interrupt(); } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setDetailRequired(boolean detail) { this.detailRequired = detail; setModified(true); if (me != null) me.interrupt(); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setDetailRequired(boolean detail) { this.detailRequired = detail; setModified(true); if (me != null) me.interrupt(); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setDetailRequired(boolean detail) { this.detailRequired = detail; setModified(true); if (me != null) me.interrupt(); } void startService(); void stopService(); synchronized void setSleepTime(long sleepTime)... | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setDetailRequired(boolean detail) { this.detailRequired = detail; setModified(true); if (me != null) me.interrupt(); } void startService(); void stopService(); synchronized void setSleepTime(long sleepTime)... |
@Test public void testGetL6() { byte[] value = new byte[0]; byte[] result = tl.createTLVMsg(TEST_TAG1, value).getL(); assertArrayEquals(ISOUtil.hex2byte("00"), result); } | public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBytes); rBytes[0] = (byte) (0x80... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... |
@Test public void testPrepareForAbort2() throws Throwable { int result = transactionManager.prepareForAbort(new Debug(), 100L, Boolean.FALSE); assertEquals(129, result, "result"); } | protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(id, "prepareForAbort", p); return ((AbortParticipant)p).prepareForAbort (id, context); } } catch (Throwable t) { getLog().warn ("PREPARE-F... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepareForAbort (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { if (p instanceof AbortParticipant) { setThreadName(i... |
@Test public void testPrepareThrowsNullPointerException3() throws Throwable { List<TransactionParticipant> members = new ArrayList(); List<TransactionParticipant> arrayList = new ArrayList(); arrayList.add(new Forward()); LogEvent evt = new LogEvent(); try { transactionManager.prepare(1, 100L, Boolean.FALSE, members, a... | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepareThrowsNullPointerException5() throws Throwable { LogEvent evt = new LogEvent("testTransactionManagerTag"); List<TransactionParticipant> members = new ArrayList(); List<TransactionParticipant> arrayList = new ArrayList(); boolean abort = arrayList.add(new Trace()); try { transactionManager.p... | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPrepareThrowsNullPointerException9() throws Throwable { LogEvent evt = new LogEvent(); try { transactionManager.prepare(1, 100L, new UnsupportedEncodingException(), members, null, true, evt, null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVe... | protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, context); } catch (Throwable t) { getLog().warn ("PREPARE: " + Long.toString (id), t); } finally { if (metrics != null) metrics.record(getName... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected int prepare (TransactionParticipant p, long id, Serializable context) { Chronometer c = new Chronometer(); try { setThreadName(id, "prepare", p); return p.prepare (id, conte... |
@Test public void testPurgeThrowsNullPointerException() throws Throwable { try { transactionManager.purge(100L, true); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot... | protected void purge (long id, boolean full) { String stateKey = getKey (STATE, id); String contextKey = getKey (CONTEXT, id); String groupsKey = getKey (GROUPS, id); synchronized (psp) { commitOff (psp); if (full) SpaceUtil.wipe(psp, stateKey); SpaceUtil.wipe(psp, contextKey); SpaceUtil.wipe(psp, groupsKey); commitOn ... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void purge (long id, boolean full) { String stateKey = getKey (STATE, id); String contextKey = getKey (CONTEXT, id); String groupsKey = getKey (GROUPS, id); synchronized (ps... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void purge (long id, boolean full) { String stateKey = getKey (STATE, id); String contextKey = getKey (CONTEXT, id); String groupsKey = getKey (GROUPS, id); synchronized (ps... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void purge (long id, boolean full) { String stateKey = getKey (STATE, id); String contextKey = getKey (CONTEXT, id); String groupsKey = getKey (GROUPS, id); synchronized (ps... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void purge (long id, boolean full) { String stateKey = getKey (STATE, id); String contextKey = getKey (CONTEXT, id); String groupsKey = getKey (GROUPS, id); synchronized (ps... |
@Test public void testRecoverThrowsNullPointerException() throws Throwable { try { transactionManager.recover(1, 100L); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Canno... | protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = head; syncTail (); } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... |
@Test public void testRecoverThrowsNullPointerException1() throws Throwable { try { transactionManager.recover(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot ente... | protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = head; syncTail (); } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void recover () { if (doRecover) { if (tail < head) { getLog().info ("recover - tail=" +tail+", head="+head); } while (tail < head) { recover (0, tail++); } } else tail = he... |
@Test public void testRetryTaskRun() throws Throwable { new TransactionManager().new RetryTask().run(); assertTrue(true, "Test completed without Exception"); } | @Override public void run () { long id = 0; int session = 0; List<TransactionParticipant> members = null; Iterator<TransactionParticipant> iter = null; PausedTransaction pt; boolean abort = false; LogEvent evt = null; Profiler prof; boolean paused; boolean transactionActive; Thread thread = Thread.currentThread(); if (... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void run () { long id = 0; int session = 0; List<TransactionParticipant> members = null; Iterator<TransactionParticipant> iter = null; PausedTransaction pt; boolean a... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void run () { long id = 0; int session = 0; List<TransactionParticipant> members = null; Iterator<TransactionParticipant> iter = null; PausedTransaction pt; boolean a... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void run () { long id = 0; int session = 0; List<TransactionParticipant> members = null; Iterator<TransactionParticipant> iter = null; PausedTransaction pt; boolean a... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void run () { long id = 0; int session = 0; List<TransactionParticipant> members = null; Iterator<TransactionParticipant> iter = null; PausedTransaction pt; boolean a... |
@Test public void testSetConfiguration() throws Throwable { Configuration cfg = new SimpleConfiguration(); transactionManager.setConfiguration(cfg); assertTrue(transactionManager.debug, "transactionManager.debug"); assertSame(cfg, transactionManager.getConfiguration(), "transactionManager.getConfiguration()"); assertEq... | @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.getBoolean ("debug-context", debug); profiler = cfg.getBoolean ("profiler", debug); if (profiler || debugContext) debug = true; doRecover = ... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... |
@Test public void testSetConfigurationThrowsNullPointerException() throws Throwable { Configuration cfg = new SubConfiguration(); try { transactionManager.setConfiguration(cfg); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getM... | @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.getBoolean ("debug-context", debug); profiler = cfg.getBoolean ("profiler", debug); if (profiler || debugContext) debug = true; doRecover = ... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void setConfiguration (Configuration cfg) throws ConfigurationException { super.setConfiguration (cfg); debug = cfg.getBoolean ("debug", true); debugContext = cfg.get... |
@Test public void testSetSleepTime() throws Throwable { systemMonitor.setSleepTime(1L); assertEquals(1L, systemMonitor.getSleepTime(), "systemMonitor.getSleepTime()"); assertTrue(systemMonitor.isModified(), "systemMonitor.isModified()"); } | public synchronized void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; setModified(true); if (me != null) me.interrupt(); } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; setModified(true); if (me != null) me.interrupt(); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; setModified(true); if (me != null) me.interrupt(); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; setModified(true); if (me != null) me.interrupt(); } void startService(); void stopService(); synchronized void setSleepTime(long sleepTime); synch... | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { public synchronized void setSleepTime(long sleepTime) { this.sleepTime = sleepTime; setModified(true); if (me != null) me.interrupt(); } void startService(); void stopService(); synchronized void setSleepTime(long sleepTime); synch... |
@Test public void testSetStateThrowsNullPointerException() throws Throwable { try { transactionManager.setState(100L, Integer.valueOf(-1)); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else {... | protected void setState (long id, Integer state) { String stateKey = getKey (STATE, id); synchronized (psp) { commitOff (psp); SpaceUtil.wipe(psp, stateKey); if (state!= null) psp.out (stateKey, state); commitOn (psp); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void setState (long id, Integer state) { String stateKey = getKey (STATE, id); synchronized (psp) { commitOff (psp); SpaceUtil.wipe(psp, stateKey); if (state!= null) psp.out... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void setState (long id, Integer state) { String stateKey = getKey (STATE, id); synchronized (psp) { commitOff (psp); SpaceUtil.wipe(psp, stateKey); if (state!= null) psp.out... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void setState (long id, Integer state) { String stateKey = getKey (STATE, id); synchronized (psp) { commitOff (psp); SpaceUtil.wipe(psp, stateKey); if (state!= null) psp.out... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void setState (long id, Integer state) { String stateKey = getKey (STATE, id); synchronized (psp) { commitOff (psp); SpaceUtil.wipe(psp, stateKey); if (state!= null) psp.out... |
@Test public void testSnapshotThrowsNullPointerException() throws Throwable { try { transactionManager.snapshot(100L, "testString", Integer.valueOf(-100)); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessa... | protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } @Override void initService(); @Override void startService(); @Override void stopService(); v... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } @Override void initService(); @Override void startService(); @Override void stopService(); v... |
@Test public void testSnapshotThrowsNullPointerException1() throws Throwable { try { transactionManager.snapshot(100L, new Comment("testTransactionManagerText")); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.g... | protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } @Override void initService(); @Override void startService(); @Override void stopService(); v... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } @Override void initService(); @Override void startService(); @Override void stopService(); v... |
@Test public void testStartServiceThrowsNullPointerException1() throws Throwable { transactionManager.setName("testTransactionManagerName"); try { transactionManager.startService(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.... | @Override public void startService () throws Exception { NameRegistrar.register(getName(), this); recover(); threads = Collections.synchronizedList(new ArrayList(maxSessions)); if (tps != null) tps.stop(); tps = new TPS (cfg.getBoolean ("auto-update-tps", true)); for (int i=0; i<sessions; i++) { new Thread(this).start(... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void startService () throws Exception { NameRegistrar.register(getName(), this); recover(); threads = Collections.synchronizedList(new ArrayList(maxSessions)); if (tp... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void startService () throws Exception { NameRegistrar.register(getName(), this); recover(); threads = Collections.synchronizedList(new ArrayList(maxSessions)); if (tp... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void startService () throws Exception { NameRegistrar.register(getName(), this); recover(); threads = Collections.synchronizedList(new ArrayList(maxSessions)); if (tp... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { @Override public void startService () throws Exception { NameRegistrar.register(getName(), this); recover(); threads = Collections.synchronizedList(new ArrayList(maxSessions)); if (tp... |
@Test public void testTailDoneThrowsNullPointerException() throws Throwable { try { transactionManager.tailDone(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot inv... | protected boolean tailDone () { String stateKey = getKey(STATE, tail); if (DONE.equals (psp.rdp (stateKey))) { purge (tail, true); return true; } return false; } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected boolean tailDone () { String stateKey = getKey(STATE, tail); if (DONE.equals (psp.rdp (stateKey))) { purge (tail, true); return true; } return false; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected boolean tailDone () { String stateKey = getKey(STATE, tail); if (DONE.equals (psp.rdp (stateKey))) { purge (tail, true); return true; } return false; } } | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected boolean tailDone () { String stateKey = getKey(STATE, tail); if (DONE.equals (psp.rdp (stateKey))) { purge (tail, true); return true; } return false; } @Override void initS... | TransactionManager extends QBeanSupport implements Runnable, TransactionConstants, TransactionManagerMBean, Loggeable, MetricsProvider { protected boolean tailDone () { String stateKey = getKey(STATE, tail); if (DONE.equals (psp.rdp (stateKey))) { purge (tail, true); return true; } return false; } @Override void initS... |
@Test public void testToString() { String expected = "01 00000002 Aborting inforString"; assertThat(transactionStatusEvent.toString(), is(expected)); } | public String toString() { return String.format("%02d %08d %s %s", session, id, state.toString(), info); } | TransactionStatusEvent { public String toString() { return String.format("%02d %08d %s %s", session, id, state.toString(), info); } } | TransactionStatusEvent { public String toString() { return String.format("%02d %08d %s %s", session, id, state.toString(), info); } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public String toString() { return String.format("%02d %08d %s %s", session, id, state.toString(), info); } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String ... | TransactionStatusEvent { public String toString() { return String.format("%02d %08d %s %s", session, id, state.toString(), info); } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String ... |
@Test public void testGetSession() { assertThat(transactionStatusEvent.getSession(), is(1)); } | public int getSession() { return session; } | TransactionStatusEvent { public int getSession() { return session; } } | TransactionStatusEvent { public int getSession() { return session; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public int getSession() { return session; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } | TransactionStatusEvent { public int getSession() { return session; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } |
@Test public void testGetId() { assertThat(transactionStatusEvent.getId(), is(2L)); } | public long getId() { return id; } | TransactionStatusEvent { public long getId() { return id; } } | TransactionStatusEvent { public long getId() { return id; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public long getId() { return id; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } | TransactionStatusEvent { public long getId() { return id; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } |
@Test public void testGetInfo() { assertThat(transactionStatusEvent.getInfo(), is("inforString")); } | public String getInfo() { return info; } | TransactionStatusEvent { public String getInfo() { return info; } } | TransactionStatusEvent { public String getInfo() { return info; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public String getInfo() { return info; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } | TransactionStatusEvent { public String getInfo() { return info; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } |
@Test public void testGetState() { assertThat(transactionStatusEvent.getState(), is(State.ABORTING)); } | public State getState() { return state; } | TransactionStatusEvent { public State getState() { return state; } } | TransactionStatusEvent { public State getState() { return state; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public State getState() { return state; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } | TransactionStatusEvent { public State getState() { return state; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } |
@Test public void testShowThreadGroupThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { String indent = "++"; systemMonitor.showThreadGroup(null, printStream, indent); }); } | void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } void startService(); void stopService(); synchr... | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } void startService(); void stopService(); synchr... |
@Test public void testGetStateAsString() { assertThat(transactionStatusEvent.getStateAsString(), is("Aborting")); } | public String getStateAsString () { return state.toString(); } | TransactionStatusEvent { public String getStateAsString () { return state.toString(); } } | TransactionStatusEvent { public String getStateAsString () { return state.toString(); } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public String getStateAsString () { return state.toString(); } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(... | TransactionStatusEvent { public String getStateAsString () { return state.toString(); } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(... |
@Test public void testGetContext() { assertThat(transactionStatusEvent.getContext(), is((Serializable) "someContextObject")); } | public Serializable getContext(){ return context; } | TransactionStatusEvent { public Serializable getContext(){ return context; } } | TransactionStatusEvent { public Serializable getContext(){ return context; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); } | TransactionStatusEvent { public Serializable getContext(){ return context; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } | TransactionStatusEvent { public Serializable getContext(){ return context; } TransactionStatusEvent(int session, State state, long id, String info, Serializable context); String toString(); int getSession(); long getId(); String getInfo(); State getState(); String getStateAsString(); Serializable getContext(); } |
@Test public void testCheckPoint() throws Throwable { new Context().checkPoint("testContextDetail"); assertTrue(true, "Test completed without Exception"); } | public void checkPoint (String detail) { getProfiler().checkPoint (detail); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key); T get... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key); T get... |
@Test public void testCheckPointNull() throws Throwable { new Context().checkPoint(null); assertTrue(true, "Test completed without Exception"); } | public void checkPoint (String detail) { getProfiler().checkPoint (detail); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key); T get... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void checkPoint (String detail) { getProfiler().checkPoint (detail); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key); T get... |
@Test public void testDump() throws Throwable { PrintStream printStream = new PrintStream(new ByteArrayOutputStream(), true); Object[] objects = new Object[2]; printStream.format(Locale.FRANCE, "testContextParam2", objects); PrintStream p = new PrintStream(printStream, true, "ISO-8859-1"); Context context = new Context... | public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } Context(); void put(Object key, Object value); void put(Object key, Object value, ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } Context(); void put(Object key, Object value); void put(Object key, Object value, ... |
@Test public void testDumpThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { Context context = new Context(); context.dump(null, "testContextIndent"); }); } | public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } Context(); void put(Object key, Object value); void put(Object key, Object value, ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<context>"); dumpMap (p, inner); p.println (indent + "</context>"); } Context(); void put(Object key, Object value); void put(Object key, Object value, ... |
@Test public void testGet() throws Throwable { Context context = new Context(); context.put("", new Object(), true); Object result = context.get(Float.valueOf(-10.0F), -100L); assertNull(result, "result"); } | public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... |
@Test public void testGet2() throws Throwable { Context context = new Context(); Object result = context.get(""); assertNull(result, "result"); } | public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... |
@Test public void testGet8() throws Throwable { Context context = new Context(); Integer defValue = -1; Integer result = (Integer) context.get("", defValue); assertSame(defValue, result, "result"); } | public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... |
@Test public void testGetLogEvent() throws Throwable { LogEvent result = new Context().getLogEvent(); assertNotNull(result); } | synchronized public LogEvent getLogEvent () { LogEvent evt = get (LOGEVT.toString()); if (evt == null) { evt = new LogEvent (); evt.setNoArmor(true); put (LOGEVT.toString(), evt); } return evt; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public LogEvent getLogEvent () { LogEvent evt = get (LOGEVT.toString()); if (evt == null) { evt = new LogEvent (); evt.setNoArmor(true); put (LOGEVT.toString(), evt); } return evt; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public LogEvent getLogEvent () { LogEvent evt = get (LOGEVT.toString()); if (evt == null) { evt = new LogEvent (); evt.setNoArmor(true); put (LOGEVT.toString(), evt); } return evt; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public LogEvent getLogEvent () { LogEvent evt = get (LOGEVT.toString()); if (evt == null) { evt = new LogEvent (); evt.setNoArmor(true); put (LOGEVT.toString(), evt); } return evt; } Context(); void put(Object key, Object value); void put(... | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public LogEvent getLogEvent () { LogEvent evt = get (LOGEVT.toString()); if (evt == null) { evt = new LogEvent (); evt.setNoArmor(true); put (LOGEVT.toString(), evt); } return evt; } Context(); void put(Object key, Object value); void put(... |
@Test public void testShowThreadGroup() throws Throwable { String indent = "++"; systemMonitor.showThreadGroup(threadGroup, printStream, indent); assertThat(baos.toString(), is("")); } | void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } } | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } void startService(); void stopService(); synchr... | SystemMonitor extends QBeanSupport implements Runnable, SystemMonitorMBean, Loggeable { void showThreadGroup(ThreadGroup g, PrintStream p, String indent) { if (g.getParent() != null) showThreadGroup(g.getParent(), p, indent + " "); else dumpThreads(g, p, indent + " "); } void startService(); void stopService(); synchr... |
@Test public void testGetPausedTransaction() throws Throwable { Context context = new Context(); PausedTransaction result = context.getPausedTransaction(); assertNull(result, "result"); } | public PausedTransaction getPausedTransaction() { return get (PAUSED_TRANSACTION.toString()); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public PausedTransaction getPausedTransaction() { return get (PAUSED_TRANSACTION.toString()); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public PausedTransaction getPausedTransaction() { return get (PAUSED_TRANSACTION.toString()); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public PausedTransaction getPausedTransaction() { return get (PAUSED_TRANSACTION.toString()); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public PausedTransaction getPausedTransaction() { return get (PAUSED_TRANSACTION.toString()); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(... |
@Test public void testGetProfiler() throws Throwable { new Context().getProfiler(); assertTrue(true, "Test completed without Exception"); } | synchronized public Profiler getProfiler () { Profiler prof = get (PROFILER.toString()); if (prof == null) { prof = new Profiler(); put (PROFILER.toString(), prof); } return prof; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public Profiler getProfiler () { Profiler prof = get (PROFILER.toString()); if (prof == null) { prof = new Profiler(); put (PROFILER.toString(), prof); } return prof; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public Profiler getProfiler () { Profiler prof = get (PROFILER.toString()); if (prof == null) { prof = new Profiler(); put (PROFILER.toString(), prof); } return prof; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public Profiler getProfiler () { Profiler prof = get (PROFILER.toString()); if (prof == null) { prof = new Profiler(); put (PROFILER.toString(), prof); } return prof; } Context(); void put(Object key, Object value); void put(Object key, Ob... | Context implements Externalizable, Loggeable, Pausable, Cloneable { synchronized public Profiler getProfiler () { Profiler prof = get (PROFILER.toString()); if (prof == null) { prof = new Profiler(); put (PROFILER.toString(), prof); } return prof; } Context(); void put(Object key, Object value); void put(Object key, Ob... |
@Test public void testGetString1() throws Throwable { Context context = new Context(); String result = context.getString("testString"); assertNull(result, "result"); } | public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } Context(); void put(Object key, Object value); void put(Object key, Obje... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } Context(); void put(Object key, Object value); void put(Object key, Obje... |
@Test public void testGetString2() throws Throwable { Context context = new Context(); String result = context.getString("", ""); assertEquals("", result, "result"); } | public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } Context(); void put(Object key, Object value); void put(Object key, Obje... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public String getString (Object key) { Object obj = getMap().get (key); if (obj instanceof String) return (String) obj; else if (obj != null) return obj.toString(); return null; } Context(); void put(Object key, Object value); void put(Object key, Obje... |
@Test public void testGetThrowsNullPointerException() throws Throwable { Context context = new Context(); try { context.get("", 49L); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { asser... | public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public <T> T get(Object key) { @SuppressWarnings("unchecked") T obj = (T) getMap().get(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object k... |
@Test public void testLog() throws Throwable { Context context = new Context(); context.getPausedTransaction(); context.log("testString"); assertTrue(true, "Test completed without Exception"); } | public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key... |
@Test public void testLog1() throws Throwable { new Context().log(""); assertTrue(true, "Test completed without Exception"); } | public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void log (Object msg) { if (msg != getMap()) getLogEvent().addMessage (msg); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); void evict(Object key); T get(Object key... |
@Test public void testPut() throws Throwable { Context context = new Context(); context.checkPoint("testContextDetail"); context.put("", Long.valueOf(-128L), true); assertTrue(true, "Test completed without Exception"); } | public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... |
@Test public void testPut1() throws Throwable { new Context().put("", new Object(), true); assertTrue(true, "Test completed without Exception"); } | public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... |
@Test public void testPut2() throws Throwable { new Context().put("", "", true); assertTrue(true, "Test completed without Exception"); } | public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... |
@Test public void testGetShutdownScript() throws Throwable { String result = new QExec().getShutdownScript(); assertNull(result, "result"); } | public String getShutdownScript () { return shutdownScript; } | QExec extends QBeanSupport implements QExecMBean { public String getShutdownScript () { return shutdownScript; } } | QExec extends QBeanSupport implements QExecMBean { public String getShutdownScript () { return shutdownScript; } } | QExec extends QBeanSupport implements QExecMBean { public String getShutdownScript () { return shutdownScript; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } | QExec extends QBeanSupport implements QExecMBean { public String getShutdownScript () { return shutdownScript; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } |
@Test public void testPut6() throws Throwable { new Context().put("", "", false); assertTrue(true, "Test completed without Exception"); } | public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... |
@Test public void testPut7() throws Throwable { Context context = new Context(); context.put("", new Object(), true); context.put("testString", new Object()); assertTrue(true, "Test completed without Exception"); } | public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... |
@Test public void testPut8() throws Throwable { new Context().put("testString", ""); assertTrue(true, "Test completed without Exception"); } | public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void put (Object key, Object value) { if (trace) { getProfiler().checkPoint( String.format("%s='%s' [%s]", getKeyName(key), value, Caller.info(1)) ); } getMap().put (key, value); synchronized (this) { notifyAll(); } } Context(); void put(Object ... |
@Test public void testReadExternalThrowsNullPointerException() throws Throwable { Context context = new Context(); try { context.readExternal(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()");... | public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); getMap(); getPMap(); int size = in.readInt(); for (int i=0; i<size; i++) { String k = (String) in.readObject(); Object v = in.readObject(); map.put (k, v); pmap.put (k, v); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); getMap(); getPMap(); int size = in.readInt(); for (int i=0; i<size; i++) { String k = (String) in.readObject(); Object v = in.readObject(); map.put (k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); getMap(); getPMap(); int size = in.readInt(); for (int i=0; i<size; i++) { String k = (String) in.readObject(); Object v = in.readObject(); map.put (k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); getMap(); getPMap(); int size = in.readInt(); for (int i=0; i<size; i++) { String k = (String) in.readObject(); Object v = in.readObject(); map.put (k... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); getMap(); getPMap(); int size = in.readInt(); for (int i=0; i<size; i++) { String k = (String) in.readObject(); Object v = in.readObject(); map.put (k... |
@Test public void testRemove() throws Throwable { Context context = new Context(); context.getProfiler(); Object result = context.remove("testString"); assertNull(result, "result"); } | public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); voi... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); voi... |
@Test public void testRemove1() throws Throwable { Context context = new Context(); Object result = context.remove(Integer.valueOf(33)); assertNull(result, "result"); } | public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); voi... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public synchronized <T> T remove(Object key) { getPMap().remove(key); @SuppressWarnings("unchecked") T obj = (T) getMap().remove(key); return obj; } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); voi... |
@Test public void testWriteExternal1() throws Throwable { Context context = new Context(); context.writeExternal(new ObjectOutputStream(new ByteArrayOutputStream())); } | public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... |
@Test public void testWriteExternalThrowsNullPointerException() throws Throwable { Context context = new Context(); try { context.writeExternal(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"... | public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void writeExternal (ObjectOutput out) throws IOException { out.writeByte (0); Set s = getPMap().entrySet(); out.writeInt (s.size()); Iterator iter = s.iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObjec... |
@Test public void testPersist() throws IOException, ClassNotFoundException { Context context = new Context(); context.put ("A", "ABC"); context.put ("B", "BCD"); context.persist("A"); context.persist("B"); Context deser = Serializer.serializeDeserialize(context); assertEquals(deser.get("A"), "ABC"); assertEquals(deser.... | public void persist (Object key) { Object value = get(key); if (value instanceof Serializable) getPMap().put (key, value); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void persist (Object key) { Object value = get(key); if (value instanceof Serializable) getPMap().put (key, value); } } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void persist (Object key) { Object value = get(key); if (value instanceof Serializable) getPMap().put (key, value); } Context(); } | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void persist (Object key) { Object value = get(key); if (value instanceof Serializable) getPMap().put (key, value); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); v... | Context implements Externalizable, Loggeable, Pausable, Cloneable { public void persist (Object key) { Object value = get(key); if (value instanceof Serializable) getPMap().put (key, value); } Context(); void put(Object key, Object value); void put(Object key, Object value, boolean persist); void persist(Object key); v... |
@Test public void testClone() throws IOException, ClassNotFoundException { Context context = new Context(); context.put ("A", "ABC", true); context.put ("B", "BCD"); Context cloned = context.clone(); assertEquals(cloned.get("A"), "ABC"); assertEquals(cloned.get("B"), "BCD"); assertEquals(context, cloned); context = Ser... | @Override public Context clone() { try { Context context = (Context) super.clone(); if (map != null) { context.map = Collections.synchronizedMap (new LinkedHashMap<>()); context.map.putAll(map); } if (pmap != null) { context.pmap = Collections.synchronizedMap (new LinkedHashMap<>()); context.pmap.putAll(pmap); } return... | Context implements Externalizable, Loggeable, Pausable, Cloneable { @Override public Context clone() { try { Context context = (Context) super.clone(); if (map != null) { context.map = Collections.synchronizedMap (new LinkedHashMap<>()); context.map.putAll(map); } if (pmap != null) { context.pmap = Collections.synchron... | Context implements Externalizable, Loggeable, Pausable, Cloneable { @Override public Context clone() { try { Context context = (Context) super.clone(); if (map != null) { context.map = Collections.synchronizedMap (new LinkedHashMap<>()); context.map.putAll(map); } if (pmap != null) { context.pmap = Collections.synchron... | Context implements Externalizable, Loggeable, Pausable, Cloneable { @Override public Context clone() { try { Context context = (Context) super.clone(); if (map != null) { context.map = Collections.synchronizedMap (new LinkedHashMap<>()); context.map.putAll(map); } if (pmap != null) { context.pmap = Collections.synchron... | Context implements Externalizable, Loggeable, Pausable, Cloneable { @Override public Context clone() { try { Context context = (Context) super.clone(); if (map != null) { context.map = Collections.synchronizedMap (new LinkedHashMap<>()); context.map.putAll(map); } if (pmap != null) { context.pmap = Collections.synchron... |
@Test public void testGetStartScript() throws Throwable { String result = new QExec().getStartScript(); assertNull(result, "result"); } | public String getStartScript () { return startScript; } | QExec extends QBeanSupport implements QExecMBean { public String getStartScript () { return startScript; } } | QExec extends QBeanSupport implements QExecMBean { public String getStartScript () { return startScript; } } | QExec extends QBeanSupport implements QExecMBean { public String getStartScript () { return startScript; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } | QExec extends QBeanSupport implements QExecMBean { public String getStartScript () { return startScript; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } |
@Test public void testPrepare() { assertThat(hasEntry.prepare(1L, context), is(HasEntry.PREPARED | HasEntry.NO_JOIN | HasEntry.READONLY)); } | public int prepare (long id, Serializable o) { return PREPARED | NO_JOIN | READONLY; } | HasEntry implements GroupSelector, Configurable { public int prepare (long id, Serializable o) { return PREPARED | NO_JOIN | READONLY; } } | HasEntry implements GroupSelector, Configurable { public int prepare (long id, Serializable o) { return PREPARED | NO_JOIN | READONLY; } } | HasEntry implements GroupSelector, Configurable { public int prepare (long id, Serializable o) { return PREPARED | NO_JOIN | READONLY; } int prepare(long id, Serializable o); String select(long id, Serializable ser); void commit(long id, Serializable o); void abort(long id, Serializable o); void setConfiguration(Confi... | HasEntry implements GroupSelector, Configurable { public int prepare (long id, Serializable o) { return PREPARED | NO_JOIN | READONLY; } int prepare(long id, Serializable o); String select(long id, Serializable ser); void commit(long id, Serializable o); void abort(long id, Serializable o); void setConfiguration(Confi... |
@Test public void testSelect() { given(configuration.get("name")).willReturn("XYZtest"); given(context.get("XYZtest")).willReturn("someStuffs"); given(configuration.get("yes", "UNKNOWN")).willReturn("someStuffs"); String result = hasEntry.select(2L, context); assertThat(result, is("someStuffs")); } | public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } } | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } } | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } int prepare(long id, Serializable o); String select(long id, Serializa... | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } int prepare(long id, Serializable o); String select(long id, Serializa... |
@Test public void testSelectNo() { given(configuration.get("name")).willReturn("XYZtest"); given(context.get("XYZtest")).willReturn(null); given(configuration.get("no", "UNKNOWN")).willReturn("differentStuffs"); String result = hasEntry.select(3L, context); assertThat(result, is("differentStuffs")); } | public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } } | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } } | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } int prepare(long id, Serializable o); String select(long id, Serializa... | HasEntry implements GroupSelector, Configurable { public String select (long id, Serializable ser) { Context ctx = (Context) ser; String name = cfg.get ("name"); String action = ctx.get (name) != null ? YES : NO; return cfg.get (action, UNKNOWN); } int prepare(long id, Serializable o); String select(long id, Serializa... |
@Test public void testSetConfiguration() throws ConfigurationException { delay.setConfiguration(cfg); verify(cfg, atLeastOnce()).getLong("prepare-delay"); verify(cfg, atLeastOnce()).getLong("commit-delay"); verify(cfg, atLeastOnce()).getLong("abort-delay"); verify(cfg, atLeastOnce()).getBoolean("random"); } | public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : null; } | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... |
@Test public void testSetConfigurationNoRandomOrSetVars() throws ConfigurationException { given(cfg.getLong("prepare-delay")).willReturn(0L); given(cfg.getLong("commit-delay")).willReturn(0L); given(cfg.getLong("abort-delay")).willReturn(0L); given(cfg.getBoolean("random")).willReturn(false); delay.setConfiguration(cfg... | public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : null; } | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... | Delay implements TransactionParticipant, Configurable { public void setConfiguration(Configuration cfg) throws ConfigurationException { prepareDelay = cfg.getLong ("prepare-delay"); commitDelay = cfg.getLong ("commit-delay"); abortDelay = cfg.getLong ("abort-delay"); random = cfg.getBoolean ("random") ? new Random() : ... |
@Test public void testPrepare() { assertThat(delay.prepare(0L, context), is(PREPARED)); } | public int prepare(long id, Serializable context) { sleep (prepareDelay); return PREPARED; } | Delay implements TransactionParticipant, Configurable { public int prepare(long id, Serializable context) { sleep (prepareDelay); return PREPARED; } } | Delay implements TransactionParticipant, Configurable { public int prepare(long id, Serializable context) { sleep (prepareDelay); return PREPARED; } } | Delay implements TransactionParticipant, Configurable { public int prepare(long id, Serializable context) { sleep (prepareDelay); return PREPARED; } int prepare(long id, Serializable context); void commit(long id, Serializable context); void abort(long id, Serializable context); void setConfiguration(Configuration cfg... | Delay implements TransactionParticipant, Configurable { public int prepare(long id, Serializable context) { sleep (prepareDelay); return PREPARED; } int prepare(long id, Serializable context); void commit(long id, Serializable context); void abort(long id, Serializable context); void setConfiguration(Configuration cfg... |
@Test public void testComputeDelay() { delay.sleep(5L); verify(random, atLeastOnce()).nextDouble(); } | void sleep (long delay) { if (delay > 0L) { try { Thread.sleep (random != null ? (long)random.nextDouble()*delay : delay); } catch (InterruptedException ignored) { } } } | Delay implements TransactionParticipant, Configurable { void sleep (long delay) { if (delay > 0L) { try { Thread.sleep (random != null ? (long)random.nextDouble()*delay : delay); } catch (InterruptedException ignored) { } } } } | Delay implements TransactionParticipant, Configurable { void sleep (long delay) { if (delay > 0L) { try { Thread.sleep (random != null ? (long)random.nextDouble()*delay : delay); } catch (InterruptedException ignored) { } } } } | Delay implements TransactionParticipant, Configurable { void sleep (long delay) { if (delay > 0L) { try { Thread.sleep (random != null ? (long)random.nextDouble()*delay : delay); } catch (InterruptedException ignored) { } } } int prepare(long id, Serializable context); void commit(long id, Serializable context); void ... | Delay implements TransactionParticipant, Configurable { void sleep (long delay) { if (delay > 0L) { try { Thread.sleep (random != null ? (long)random.nextDouble()*delay : delay); } catch (InterruptedException ignored) { } } } int prepare(long id, Serializable context); void commit(long id, Serializable context); void ... |
@Test public void testInvalidTransaction () { Context ctx = new Context(); int action = cf.prepare(1L, ctx); assertEquals (ABORTED | NO_JOIN | READONLY, action, "Action should be ABORTED|NO_JOIN|READONLY"); Result rc = ctx.getResult(); assertTrue(rc.hasFailures(), "RC should have failures"); assertEquals(CMF.INVALID_TR... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testMandatoryPCodeNotPresent () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "3"); int action = cf.prepare(1L, ctx); assertEquals (ABORTED | NO_JOIN | READONLY, action, "Action should be ABORTED|NO_JOIN|READONLY"); Result... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testOptionalPCodeNotPresent () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); ctx.put(ContextConstants.REQUEST.toString(), m); int action = cf.prepare(1L, ctx); assertEquals (PREPARED | NO_JOIN | READONLY, action, "Action should be PREPARED|NO_JOIN|READONLY"); Result rc = ctx.getResult(); ass... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testSetShutdownScript() throws Throwable { QExec qExec = new QExec(); qExec.setShutdownScript("testQExecScriptPath"); assertEquals("testQExecScriptPath", qExec.shutdownScript, "qExec.shutdownScript"); } | public void setShutdownScript (String scriptPath) { shutdownScript = scriptPath; } | QExec extends QBeanSupport implements QExecMBean { public void setShutdownScript (String scriptPath) { shutdownScript = scriptPath; } } | QExec extends QBeanSupport implements QExecMBean { public void setShutdownScript (String scriptPath) { shutdownScript = scriptPath; } } | QExec extends QBeanSupport implements QExecMBean { public void setShutdownScript (String scriptPath) { shutdownScript = scriptPath; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } | QExec extends QBeanSupport implements QExecMBean { public void setShutdownScript (String scriptPath) { shutdownScript = scriptPath; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } |
@Test public void testNoExtraFields () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(3, "000000"); m.set(11, "000001"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "11"); cfg.put("optional", "3"); int action = cf.prepare(1L, ctx); assertEquals (PREPARED | NO_JOIN | READONLY, ac... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testExtraFields () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(3, "000000"); m.set(11, "000001"); m.set(41, "29110001"); m.set(42, "000000000000001"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "11"); cfg.put("optional", "3"); int action = cf.prepare(1L, ct... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testInvalidPCode () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(3, "*00000"); m.set(11, "000001"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("optional", "PCODE"); int action = cf.prepare(1L, ctx); assertEquals (ABORTED | NO_JOIN | READONLY, action, "Action should be AB... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testValidCard () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(2, "4111111111111111"); m.set(14, "2912"); m.set(35, "4111111111111111=2912"); m.set(45, "B4111111111111111^TEST CARDHOLDER^29120000000000000000"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "CARD... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testInvalidCard () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(2, "4111111111111111"); m.set(14, "2912"); m.set(35, "4111111111111112=2912"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "CARD"); int action = cf.prepare(1L, ctx); assertEquals(ABORTED | NO_JOI... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testInvalidMidAndTid () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(41, "*1"); m.set(42, "*2"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "MID, TID"); int action = cf.prepare(1L, ctx); assertEquals(ABORTED | NO_JOIN | READONLY, action); Result rc = ctx.get... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testMidAndTidWithSpaces () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(41, "0001 "); m.set(42, "0000000001 "); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "MID, TID"); int action = cf.prepare(1L, ctx); assertEquals(PREPARED | NO_JOIN | READONLY, action); Res... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testValidTimestamps () { Date now = new Date(); Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(7, ISODate.getDateTime(now)); m.set(12, ISODate.getDateTime(now)); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "7 12"); int action = cf.prepare(1L, ctx); assertEquals(P... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testInvalidTimestamp () { Date now = new Date(); Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(7, ISODate.getDateTime(now)); m.set(12, "*"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "TRANSMISSION_TIMESTAMP TRANSACTION_TIMESTAMP"); int action = cf.prepare(1L, ... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testGenericFields () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(48, "Mandatory field 48"); m.set(60, "Optional field"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "48"); cfg.put("optional", "60"); int action = cf.prepare(1L, ctx); assertEquals(PREPARED | N... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testSetStartScript() throws Throwable { QExec qExec = new QExec(); qExec.setStartScript("testQExecScriptPath"); assertEquals("testQExecScriptPath", qExec.startScript, "qExec.startScript"); } | public void setStartScript (String scriptPath) { startScript = scriptPath; } | QExec extends QBeanSupport implements QExecMBean { public void setStartScript (String scriptPath) { startScript = scriptPath; } } | QExec extends QBeanSupport implements QExecMBean { public void setStartScript (String scriptPath) { startScript = scriptPath; } } | QExec extends QBeanSupport implements QExecMBean { public void setStartScript (String scriptPath) { startScript = scriptPath; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } | QExec extends QBeanSupport implements QExecMBean { public void setStartScript (String scriptPath) { startScript = scriptPath; } void setStartScript(String scriptPath); String getStartScript(); void setShutdownScript(String scriptPath); String getShutdownScript(); } |
@Test public void testGenericFieldsOptionalNotPresent () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(48, "Mandatory field 48"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "48"); cfg.put("optional", "60"); int action = cf.prepare(1L, ctx); assertEquals(PREPARED | NO_JOIN | RE... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testGenericFieldsExtraPresent () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(48, "Mandatory field 48"); m.set(60, "Extra field 60"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "48"); int action = cf.prepare(1L, ctx); assertEquals(ABORTED | NO_JOIN | READONL... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testPDC () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(22, new byte[16]); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "POS_DATA_CODE"); int action = cf.prepare(1L, ctx); assertEquals(PREPARED | NO_JOIN | READONLY, action); Result rc = ctx.getResult(); assert... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testCaptureDate () { Context ctx = new Context(); ISOMsg m = new ISOMsg(); m.set(17, "0101"); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "CAPTURE_DATE"); int action = cf.prepare(1L, ctx); assertEquals(PREPARED | NO_JOIN | READONLY, action); Result rc = ctx.getResult(); asser... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testAmounts () throws ISOException { Context ctx = new Context(); ISOMsg m = new ISOMsg(); ISOAmount local = new ISOAmount(4, 858, new BigDecimal("290.00")); ISOAmount settlement = new ISOAmount (5, 840, new BigDecimal("10.00")); m.set(local); m.set(settlement); ctx.put(ContextConstants.REQUEST.toStri... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
@Test public void testOriginalDataElements () throws ISOException { Context ctx = new Context(); ISOMsg m = new ISOMsg(); Date now = new Date(); m.set(56, "0200000000000001" + ISODate.formatDate(now, "yyyyMMddHHmmss")); ctx.put(ContextConstants.REQUEST.toString(), m); cfg.put("mandatory", "ORIGINAL_DATA_ELEMENTS"); int... | public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Context", request); return ABORTED | NO_JOIN | READONLY; } Set<Strin... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... | CheckFields implements TransactionParticipant, Configurable { public int prepare (long id, Serializable context) { Context ctx = (Context) context; Result rc = ctx.getResult(); try { ISOMsg m = ctx.get (request); if (m == null) { ctx.getResult().fail(CMF.INVALID_TRANSACTION, Caller.info(), "'%s' not available in Contex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.