Skip to content
Snippets Groups Projects
Commit 3e556b0b authored by benjamin.franksen's avatar benjamin.franksen
Browse files

adapted tests to use pvGet/Put timeouts

parent 95db9805
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,6 @@ program pvGetSyncTest
%%#include "../testSupport.h"
%%extern double seq_sync_timeout;
foreign seq_sync_timeout;
entry {
seq_test_init(2);
}
......@@ -25,10 +21,9 @@ ss sstest {
state stest1 {
when () {
int status;
seq_sync_timeout = 0.1;
pvPut(p, ASYNC);
testDiag("x=%f",x);
status = pvGet(x,SYNC);
status = pvGet(x,SYNC,0.1);
testOk(status==pvStatTIMEOUT, "pvGet/SYNC, status=%d (%s)",
status, status ? pvMessage(x) : "");
testDiag("x=%f",x);
......@@ -38,9 +33,8 @@ ss sstest {
when (pvPutComplete(p)) {
int status;
pvPut(p, ASYNC);
seq_sync_timeout = 10.0;
testDiag("x=%f",x);
status = pvGet(x,SYNC);
status = pvGet(x,SYNC,10.0);
testOk(status==pvStatOK, "pvGet/SYNC, status=%d (%s)",
status, status ? pvMessage(x) : "");
testDiag("x=%f",x);
......
......@@ -8,10 +8,6 @@ program pvPutAsyncTest
%%#include "../testSupport.h"
%%extern double seq_sync_timeout;
foreign seq_sync_timeout;
int x;
assign x to "pvPutAsync1";
......@@ -56,15 +52,13 @@ ss test1 {
i, status, status ? pvMessage(x) : "");
}
i = 2;
seq_sync_timeout = 1.0;
status = pvPut(x,SYNC);
status = pvPut(x,SYNC,1.0);
/* should fail */
testOk(status==pvStatTIMEOUT, "pvPut/SYNC %d, status=%d (%s)",
i, status, status ? pvMessage(x) : "");
i = 3;
seq_sync_timeout = 10.0;
status = pvPut(x,SYNC);
status = pvPut(x,SYNC,10.0);
/* should succeed */
testOk(status==pvStatOK, "pvPut/SYNC %d, status=%d (%s)",
i, status, status ? pvMessage(x) : "");
......
......@@ -45,9 +45,9 @@ exit {
%{
static void incr(SS_ID ssId, int *pv, VAR_ID v)
{
seq_pvGet(ssId, v, SYNC);
seq_pvGet(ssId, v, SYNC, 1.0);
*pv += 1;
seq_pvPut(ssId, v, SYNC);
seq_pvPut(ssId, v, SYNC, 1.0);
}
static void set_i(SEQ_VARS *const pVar, int value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment