Skip to content

Commit

Permalink
testing workaround - works!
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Jul 8, 2023
1 parent 564dcad commit 9a8d1be
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def test_kvs_commit():
assert "bustable" not in spec["attributes"]["system"]

print("\n🧝‍♀️️ Updating the spec in kvs and committing!")
kvs["jobspec"] = spec
kvs.commit()
# kvs["jobspec"] = spec
# This is the workaround
kvs[kvs.key_at("jobspec")] = spec
assert kvs.commit() == 0

print("🦾️ Re-retrieving the kvs and spec...")
kvs = flux.job.job_kvs(handle, job["id"])
Expand All @@ -63,10 +65,12 @@ def test_adding_attribute():
print("\n🧝‍♀️️ Adding a new variable to the kvs and committing!")
# Weird that this doesn't even stick!
# I tried an integer, a string, and a boolean
kvs["burstable"] = 1
# kvs["burstable"] = 1
# This is the workaround!
kvs[kvs.key_at("burstable")] = 1
value = kvs.get("burstable")
print(f"Found value {value}")
kvs.commit()
assert kvs.commit() == 0

print("🦾️ Re-retrieving the kvs...")
kvs = flux.job.job_kvs(handle, job["id"])
Expand Down

0 comments on commit 9a8d1be

Please sign in to comment.