From f050c7f1de1fe03e2253f408445a69e9402f60ee Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 16 Jun 2016 11:00:01 -0400 Subject: Client-side: detect session timeout and ask the user to reload --- tests/timeout.ur | 22 ++++++++++++++++++++++ tests/timeout.urp | 7 +++++++ tests/timeout.urs | 1 + 3 files changed, 30 insertions(+) create mode 100644 tests/timeout.ur create mode 100644 tests/timeout.urp create mode 100644 tests/timeout.urs (limited to 'tests') diff --git a/tests/timeout.ur b/tests/timeout.ur new file mode 100644 index 00000000..d96b42bd --- /dev/null +++ b/tests/timeout.ur @@ -0,0 +1,22 @@ +table listeners : { Ch : channel unit } + +fun ping () = + queryI1 (SELECT * FROM listeners) + (fn r => send r.Ch ()) + +fun main () = + ch <- channel; + dml (INSERT INTO listeners(Ch) VALUES ({[ch]})); + count <- source 0; + return + + + diff --git a/tests/timeout.urp b/tests/timeout.urp new file mode 100644 index 00000000..6d3ca878 --- /dev/null +++ b/tests/timeout.urp @@ -0,0 +1,7 @@ +timeout 2 +rewrite url Timeout/* +database dbname=test +sql timeout.sql +safeGet main + +timeout diff --git a/tests/timeout.urs b/tests/timeout.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/timeout.urs @@ -0,0 +1 @@ +val main : unit -> transaction page -- cgit v1.2.3