File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -734,7 +734,9 @@ def eventlog(args):
734
734
evf = EventLogFormatter (
735
735
format = args .format , timestamp_format = args .time_format , color = args .color
736
736
)
737
- consumer = ResourceJournalConsumer (h , include_sentinel = True ).start ()
737
+ # The sentinel event is only used if we're not following the eventlog:
738
+ sentinel = not args .follow
739
+ consumer = ResourceJournalConsumer (h , include_sentinel = sentinel ).start ()
738
740
while True :
739
741
event = consumer .poll ()
740
742
if event is None or event .is_empty ():
Original file line number Diff line number Diff line change @@ -119,16 +119,21 @@ test_expect_success 'that event WAS posted to the KVS' '
119
119
test $(grep resource-define kvs2 | wc -l) -eq 2
120
120
'
121
121
test_expect_success NO_CHAIN_LINT ' watch eventlog in the background waiting on drain' '
122
- flux resource eventlog -F --wait=drain >bgeventlog &
123
- echo $! >bgpid
122
+ flux resource eventlog -HF --wait=drain >bgeventlog &
123
+ echo $! >bgpid &&
124
+ # ensure RPC is established before moving on
125
+ waitfile.lua -vt 15 bgeventlog
124
126
'
125
127
test_expect_success NO_CHAIN_LINT ' drain rank 1' '
126
128
flux resource drain 1
127
129
'
128
130
test_expect_success NO_CHAIN_LINT ' background watcher completed successfully' '
129
131
wait $(cat bgpid)
130
132
'
131
-
133
+ test_expect_success NO_CHAIN_LINT ' background watcher waited for drain event' '
134
+ test_debug "cat bgeventlog" &&
135
+ tail -1 bgeventlog | grep drain
136
+ '
132
137
test_expect_success ' run restartable flux instance, drain 0' '
133
138
flux start --setattr=statedir=$(pwd) \
134
139
sh -c "flux resource eventlog --wait=resource-define \
You can’t perform that action at this time.
0 commit comments