ph: fix tests by spamming blocks regularly

This commit is contained in:
Philip Monk 2019-12-17 21:03:01 -08:00 committed by Jared Tobin
parent de2d0f3014
commit 1a7658bd91
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
2 changed files with 24 additions and 8 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f8645c0d4a231d5a6c81e0d543667a319edd8e514318c8583f5e0636d8e552b
size 9619669
oid sha256:d2c08caf6f69f9fa349003da923d0b6507a8b6df763a0ee491f195a937630843
size 9620244

View File

@ -7,6 +7,7 @@
+$ state
$: logs=(list az-log) :: oldest logs first
lives=(map ship [lyfe=life rut=rift])
tym=@da
==
::
+$ azimuth-command
@ -22,19 +23,34 @@
|= args=vase
=/ m (strand ,vase)
^- form:m
;< ~ bind:m (watch-our:strandio /effect/request %aqua /effect/request)
;< ~ bind:m (watch-our:strandio /effect/request %aqua /effect/request)
:: need blits for raw-ship to check booted
::
;< ~ bind:m (watch-our:strandio /effect/blit %aqua /effect/blit)
;< ~ bind:m
%- (main-loop:strandio ,state)
;< ~ bind:m (watch-our:strandio /effect/blit %aqua /effect/blit)
:: start timer to advance 10 blocks every 20 seconds
;< now=@da bind:m get-time:strandio
=/ a-state=state [~ ~ (add now ~s40)]
;< ~ bind:m (send-wait:strandio tym.a-state)
;< ~ bind:m
%- (main-loop:strandio ,_a-state)
:~ |=(=state ~(handle-unix-effect core state))
|=(=state ~(handle-poke core state))
|=(=state ~(handle-wake core state))
pure:(strand ,state)
==
(pure:m *vase)
::
|_ =state
++ handle-wake
=/ m (strand ,_state)
^- form:m
;< ~ bind:m ((handle:strandio ,~) (take-wake:strandio `tym.state))
~& >> 'spamming logs'
;< now=@da bind:m get-time:strandio
=. tym.state (add now ~s40)
;< ~ bind:m (send-wait:strandio tym.state)
(spam-logs 10)
::
++ handle-unix-effect
=/ m (strand ,_state)
^- form:m
@ -353,7 +369,7 @@
1
==
==
(spam-logs 30)
(spam-logs 10)
::
++ cycle-keys
|= who=@p
@ -386,7 +402,7 @@
=. logs.state
%+ weld logs.state
[(broke-continuity:lo who rut) ~]
(spam-logs 30)
(spam-logs 10)
::
++ spam-logs
|= n=@