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 ...@@ -8,10 +8,6 @@ program pvGetSyncTest
%%#include "../testSupport.h" %%#include "../testSupport.h"
%%extern double seq_sync_timeout;
foreign seq_sync_timeout;
entry { entry {
seq_test_init(2); seq_test_init(2);
} }
...@@ -25,10 +21,9 @@ ss sstest { ...@@ -25,10 +21,9 @@ ss sstest {
state stest1 { state stest1 {
when () { when () {
int status; int status;
seq_sync_timeout = 0.1;
pvPut(p, ASYNC); pvPut(p, ASYNC);
testDiag("x=%f",x); testDiag("x=%f",x);
status = pvGet(x,SYNC); status = pvGet(x,SYNC,0.1);
testOk(status==pvStatTIMEOUT, "pvGet/SYNC, status=%d (%s)", testOk(status==pvStatTIMEOUT, "pvGet/SYNC, status=%d (%s)",
status, status ? pvMessage(x) : ""); status, status ? pvMessage(x) : "");
testDiag("x=%f",x); testDiag("x=%f",x);
...@@ -38,9 +33,8 @@ ss sstest { ...@@ -38,9 +33,8 @@ ss sstest {
when (pvPutComplete(p)) { when (pvPutComplete(p)) {
int status; int status;
pvPut(p, ASYNC); pvPut(p, ASYNC);
seq_sync_timeout = 10.0;
testDiag("x=%f",x); testDiag("x=%f",x);
status = pvGet(x,SYNC); status = pvGet(x,SYNC,10.0);
testOk(status==pvStatOK, "pvGet/SYNC, status=%d (%s)", testOk(status==pvStatOK, "pvGet/SYNC, status=%d (%s)",
status, status ? pvMessage(x) : ""); status, status ? pvMessage(x) : "");
testDiag("x=%f",x); testDiag("x=%f",x);
......
...@@ -8,10 +8,6 @@ program pvPutAsyncTest ...@@ -8,10 +8,6 @@ program pvPutAsyncTest
%%#include "../testSupport.h" %%#include "../testSupport.h"
%%extern double seq_sync_timeout;
foreign seq_sync_timeout;
int x; int x;
assign x to "pvPutAsync1"; assign x to "pvPutAsync1";
...@@ -56,15 +52,13 @@ ss test1 { ...@@ -56,15 +52,13 @@ ss test1 {
i, status, status ? pvMessage(x) : ""); i, status, status ? pvMessage(x) : "");
} }
i = 2; i = 2;
seq_sync_timeout = 1.0; status = pvPut(x,SYNC,1.0);
status = pvPut(x,SYNC);
/* should fail */ /* should fail */
testOk(status==pvStatTIMEOUT, "pvPut/SYNC %d, status=%d (%s)", testOk(status==pvStatTIMEOUT, "pvPut/SYNC %d, status=%d (%s)",
i, status, status ? pvMessage(x) : ""); i, status, status ? pvMessage(x) : "");
i = 3; i = 3;
seq_sync_timeout = 10.0; status = pvPut(x,SYNC,10.0);
status = pvPut(x,SYNC);
/* should succeed */ /* should succeed */
testOk(status==pvStatOK, "pvPut/SYNC %d, status=%d (%s)", testOk(status==pvStatOK, "pvPut/SYNC %d, status=%d (%s)",
i, status, status ? pvMessage(x) : ""); i, status, status ? pvMessage(x) : "");
......
...@@ -45,9 +45,9 @@ exit { ...@@ -45,9 +45,9 @@ exit {
%{ %{
static void incr(SS_ID ssId, int *pv, VAR_ID v) 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; *pv += 1;
seq_pvPut(ssId, v, SYNC); seq_pvPut(ssId, v, SYNC, 1.0);
} }
static void set_i(SEQ_VARS *const pVar, int value) 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