Skip to content

Commit

Permalink
t: add plugin_factor RPC to fake payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoussa1 committed Jun 3, 2022
1 parent b55c62a commit 16bd453
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 4 deletions.
7 changes: 7 additions & 0 deletions t/t1001-mf-priority-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ test_expect_success 'create fake_payload.py' '
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_fac_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_fac_data)).get()
EOF
'

Expand Down
9 changes: 8 additions & 1 deletion t/t1002-mf-priority-small-no-tie.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test_expect_success 'send the user information to the plugin' '
flux python ${SEND_PAYLOAD} fake_small_no_tie.json
'

test_expect_success 'add a default queue and send it to the plugin' '
test_expect_success 'add a default queue and plugin weights and send it to the plugin' '
cat <<-EOF >fake_payload.py
import flux
import json
Expand All @@ -58,6 +58,13 @@ test_expect_success 'add a default queue and send it to the plugin' '
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_fac_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_fac_data)).get()
EOF
flux python fake_payload.py
'
Expand Down
9 changes: 8 additions & 1 deletion t/t1003-mf-priority-small-tie.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test_expect_success 'send the user information to the plugin' '
flux python ${SEND_PAYLOAD} fake_small_tie.json
'

test_expect_success 'add a default queue and send it to the plugin' '
test_expect_success 'add a default queue and plugin weights and send it to the plugin' '
cat <<-EOF >fake_payload.py
import flux
import json
Expand All @@ -59,6 +59,13 @@ test_expect_success 'add a default queue and send it to the plugin' '
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_fac_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_fac_data)).get()
EOF
flux python fake_payload.py
'
Expand Down
9 changes: 8 additions & 1 deletion t/t1004-mf-priority-small-tie-all.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test_expect_success 'send the user information to the plugin' '
flux python ${SEND_PAYLOAD} fake_small_tie_all.json
'

test_expect_success 'add a default queue and send it to the plugin' '
test_expect_success 'add a default queue and plugin weights and send it to the plugin' '
cat <<-EOF >fake_payload.py
import flux
import json
Expand All @@ -60,6 +60,13 @@ test_expect_success 'add a default queue and send it to the plugin' '
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_fac_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_fac_data)).get()
EOF
flux python fake_payload.py
'
Expand Down
9 changes: 8 additions & 1 deletion t/t1005-max-jobs-limits.t
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test_expect_success 'update plugin with sample test data' '
flux python ${SEND_PAYLOAD} fake_user.json
'

test_expect_success 'add a default queue and send it to the plugin' '
test_expect_success 'add a default queue and plugin weights and send it to the plugin' '
cat <<-EOF >fake_payload.py
import flux
import json
Expand All @@ -69,6 +69,13 @@ test_expect_success 'add a default queue and send it to the plugin' '
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_fac_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_fac_data)).get()
EOF
flux python fake_payload.py
'
Expand Down
7 changes: 7 additions & 0 deletions t/t1012-mf-priority-load.t
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ test_expect_success 'create fake_payload.py' '
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_factor_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_factor_data)).get()
flux.Flux().rpc("job-manager.mf_priority.reprioritize")
EOF
'
Expand Down
7 changes: 7 additions & 0 deletions t/t1014-mf-priority-dne.t
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ test_expect_success 'send the user/bank information to the plugin without reprio
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_q_update", json.dumps(bulk_queue_data)).get()
bulk_fac_data = {
"data" : [
{"factor": "fairshare", "weight": 100000},
{"factor": "queue", "weight": 10000}
]
}
flux.Flux().rpc("job-manager.mf_priority.rec_fac_update", json.dumps(bulk_fac_data)).get()
EOF
flux python fake_payload.py
'
Expand Down

0 comments on commit 16bd453

Please sign in to comment.