@Test public void testExecute() throws Exception { System.out.println("execute"); SampleResult previousResult = null; Sampler currentSampler = null; FifoPut instance = new FifoPut(); String expResult = "FifoPuttest"; LinkedList<CompoundVariable> list = new LinkedList<>(); list.add(new CompoundVariable("FifoPuttest")); list.add(new CompoundVariable("FifoPuttest")); instance.setParameters(list); String result = instance.execute(null, null); Assert.assertEquals(expResult, result); }
@Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String fifoName = ((CompoundVariable) values[0]).execute(); String value = ((CompoundVariable) values[1]).execute(); try { FifoMap.getInstance().put(fifoName, value); } catch (InterruptedException ex) { log.warn("Interrupted put into queue " + fifoName); value = "INTERRUPTED"; } return value; }
FifoPut extends AbstractFunction { @Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String fifoName = ((CompoundVariable) values[0]).execute(); String value = ((CompoundVariable) values[1]).execute(); try { FifoMap.getInstance().put(fifoName, value); } catch (InterruptedException ex) { log.warn("Interrupted put into queue " + fifoName); value = "INTERRUPTED"; } return value; } }
FifoPut extends AbstractFunction { @Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String fifoName = ((CompoundVariable) values[0]).execute(); String value = ((CompoundVariable) values[1]).execute(); try { FifoMap.getInstance().put(fifoName, value); } catch (InterruptedException ex) { log.warn("Interrupted put into queue " + fifoName); value = "INTERRUPTED"; } return value; } FifoPut(); }
FifoPut extends AbstractFunction { @Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String fifoName = ((CompoundVariable) values[0]).execute(); String value = ((CompoundVariable) values[1]).execute(); try { FifoMap.getInstance().put(fifoName, value); } catch (InterruptedException ex) { log.warn("Interrupted put into queue " + fifoName); value = "INTERRUPTED"; } return value; } FifoPut(); @Override synchronized String execute(SampleResult previousResult, Sampler currentSampler); @Override synchronized void setParameters(Collection<CompoundVariable> parameters); @Override String getReferenceKey(); @Override List<String> getArgumentDesc(); }
FifoPut extends AbstractFunction { @Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String fifoName = ((CompoundVariable) values[0]).execute(); String value = ((CompoundVariable) values[1]).execute(); try { FifoMap.getInstance().put(fifoName, value); } catch (InterruptedException ex) { log.warn("Interrupted put into queue " + fifoName); value = "INTERRUPTED"; } return value; } FifoPut(); @Override synchronized String execute(SampleResult previousResult, Sampler currentSampler); @Override synchronized void setParameters(Collection<CompoundVariable> parameters); @Override String getReferenceKey(); @Override List<String> getArgumentDesc();  }