@@ -116,7 +116,7 @@ async fn test_register_invalid_closure() {
116
116
. hash (
117
117
store
118
118
. cas_insert (
119
- r#"{process : {|| 42}}"# , // Invalid closure, expects at least one argument
119
+ r#"{run : {|| 42}}"# , // Invalid closure, expects at least one argument
120
120
)
121
121
. await
122
122
. unwrap ( ) ,
@@ -162,7 +162,7 @@ async fn test_register_parse_error() {
162
162
. cas_insert (
163
163
r#"
164
164
{
165
- process : {|frame|
165
+ run : {|frame|
166
166
.head index.html | .cas
167
167
}
168
168
}
@@ -193,7 +193,7 @@ async fn test_register_parse_error() {
193
193
}
194
194
195
195
#[ tokio:: test]
196
- // This test is to ensure that a handler does not process its own output
196
+ // This test is to ensure that a handler does not run its own output
197
197
async fn test_no_self_loop ( ) {
198
198
let ( store, _temp_dir) = setup_test_environment ( ) . await ;
199
199
let options = ReadOptions :: builder ( ) . follow ( FollowOption :: On ) . build ( ) ;
@@ -204,13 +204,13 @@ async fn test_no_self_loop() {
204
204
"xs.threshold" . to_string( )
205
205
) ;
206
206
207
- // Register handler that would process its own output if not prevented
207
+ // Register handler that would run its own output if not prevented
208
208
store
209
209
. append (
210
210
Frame :: builder ( "echo.register" , ZERO_CONTEXT )
211
211
. hash (
212
212
store
213
- . cas_insert ( r#"{process : {|frame| $frame}}"# )
213
+ . cas_insert ( r#"{run : {|frame| $frame}}"# )
214
214
. await
215
215
. unwrap ( ) ,
216
216
)
@@ -271,7 +271,7 @@ async fn test_essentials() {
271
271
. cas_insert (
272
272
r#"
273
273
{
274
- process : {|frame|
274
+ run : {|frame|
275
275
if $frame.topic != "pew" { return }
276
276
"processed"
277
277
}
@@ -373,7 +373,7 @@ async fn test_unregister_on_error() {
373
373
store
374
374
. cas_insert (
375
375
r#"{
376
- process : {|frame|
376
+ run : {|frame|
377
377
let x = {"foo": null}
378
378
$x.foo.bar # Will error at runtime - null access
379
379
}
@@ -421,7 +421,7 @@ async fn test_return_options() {
421
421
ttl: "head:1"
422
422
}
423
423
424
- process : {|frame|
424
+ run : {|frame|
425
425
if $frame.topic != "ping" { return }
426
426
"pong"
427
427
}
@@ -491,7 +491,7 @@ async fn test_custom_append() {
491
491
store
492
492
. cas_insert (
493
493
r#"{
494
- process : {|frame|
494
+ run : {|frame|
495
495
if $frame.topic != "trigger" { return }
496
496
"1" | .append topic1 --meta {"t": "1"}
497
497
"2" | .append topic2 --meta {"t": "2"}
@@ -541,7 +541,7 @@ async fn test_handler_replacement() {
541
541
. hash (
542
542
store
543
543
. cas_insert (
544
- r#"{process : {|frame|
544
+ r#"{run : {|frame|
545
545
if $frame.topic != "trigger" { return }
546
546
"handler1"
547
547
}}"# ,
@@ -563,7 +563,7 @@ async fn test_handler_replacement() {
563
563
. hash (
564
564
store
565
565
. cas_insert (
566
- r#"{process : {|frame|
566
+ r#"{run : {|frame|
567
567
if $frame.topic != "trigger" { return }
568
568
"handler2"
569
569
}}"# ,
@@ -639,7 +639,7 @@ async fn test_handler_with_module() -> Result<(), Error> {
639
639
mymod: (.head mymod.nu | .cas $in.hash)
640
640
}
641
641
642
- process : {|frame|
642
+ run : {|frame|
643
643
if $frame.topic != "trigger" { return }
644
644
mymod add_nums 40 2
645
645
}
@@ -712,7 +712,7 @@ async fn test_handler_preserve_env() -> Result<(), Error> {
712
712
}
713
713
714
714
{
715
- process : {|frame|
715
+ run : {|frame|
716
716
if $frame.topic != "trigger" { return }
717
717
inc-abc
718
718
}
@@ -798,7 +798,7 @@ async fn test_handler_context_isolation() -> Result<(), Error> {
798
798
store
799
799
. cas_insert (
800
800
r#"{
801
- process : "not a closure"
801
+ run : "not a closure"
802
802
}"# ,
803
803
)
804
804
. await ?,
@@ -820,7 +820,7 @@ async fn test_handler_context_isolation() -> Result<(), Error> {
820
820
let handler_hash = store
821
821
. cas_insert (
822
822
r#"{
823
- process : {|frame|
823
+ run : {|frame|
824
824
if $frame.topic != "trigger" { return }
825
825
"explicit append" | .append echo.direct
826
826
"handler return"
0 commit comments