Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(SwingSet): Run bootstrap test vat controllers to completion #4678

Merged
merged 1 commit into from
Feb 26, 2022

Conversation

gibson042
Copy link
Member

closes: #4632

Description

Replace manual step() calls with run() in SwingSet vat controller testing.

Security Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

See above.

Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that solves the mystery of why the test broke for me when I tried to replace the loop of c.step() calls with a c.run() and now I feel kinda stupid :-)

@FUDCo FUDCo mentioned this pull request Feb 26, 2022
@gibson042
Copy link
Member Author

Not at all, I didn't see it until running buildVatController with verbose: true produced output like

processQ {"type":"send","target":"ko21","msg":{"method":"bootstrap","args":{"body":"[{\"bootstrap\":{\"@qclass\":\"slot\",\"iface\":\"Alleged: vref\",\"index\":0},\"comms\":{\"@qclass\":\"slot\",\"iface\":\"Alleged: vref\",\"index\":1},\"timer\":{\"@qclass\":\"slot\",\"iface\":\"Alleged: vref\",\"index\":2},\"vatAdmin\":{\"@qclass\":\"slot\",\"iface\":\"Alleged: vref\",\"index\":3},\"vattp\":{\"@qclass\":\"slot\",\"iface\":\"Alleged: vref\",\"index\":4}},{\"vatAdmin\":{\"@qclass\":\"slot\",\"iface\":\"Alleged: device\",\"index\":5}}]","slots":["ko21","ko22","ko23","ko20","ko24","kd30"]},"result":"kp40"}}
@ko21 <- bootstrap({bootstrap: @ko21, comms: @ko22, timer: @ko23, vatAdmin: @ko20, vattp: @ko24}, {vatAdmin: @kd30}) : @kp40
Add mapping k->v v1.c.ko22<=>v1.c.o-50
Add mapping k->v v1.c.ko23<=>v1.c.o-51
Add mapping k->v v1.c.ko20<=>v1.c.o-52
Add mapping k->v v1.c.ko24<=>v1.c.o-53
Add mapping k->v v1.c.kd30<=>v1.c.d-70
Add mapping k->v v1.c.kp40<=>v1.c.p-60
Logging sent error stack (TypeError#1)
TypeError#1: target has no method bootstrap , has []
TypeError: target has no method "bootstrap", has []

@FUDCo
Copy link
Contributor

FUDCo commented Feb 26, 2022

Yeah, but the error message 'target has no method "bootstrap"' pretty much tells the whole story, AND IT WAS RIGHT THERE...

Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. One nit: please put the closes #4632 line in the git commit comment, not just the GitHub discussion comment, so later code archaeologists can work their way back to the original issue and any discussion. (obviously not a lot for this issue, but it's a general practice I want to encourage).

@warner warner added the SwingSet package: SwingSet label Feb 26, 2022
@gibson042 gibson042 force-pushed the gibson-4632-swingset-bootstrap-tests branch from f074f2f to 566da6d Compare February 26, 2022 05:20
@gibson042 gibson042 added the automerge:squash Automatically squash merge label Feb 26, 2022
@mergify mergify bot merged commit 5647d10 into master Feb 26, 2022
@mergify mergify bot deleted the gibson-4632-swingset-bootstrap-tests branch February 26, 2022 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix swingset/test/test-controller.js leftovers
3 participants