Page MenuHomePhabricator

EventLogging ValidateSchemaTest::testValidEvent() fails under HHVM
Closed, ResolvedPublic


Running the PHPUnit tests under HHVM causes a stacktrace:

JsonSchemaException: Invalid node: expecting "string", got "boolean". Path: "Root node -> clientValidated"


Dummy change used:


It passes under Zend:

Event Timeline

hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar changed Security from none to None.
hashar added a subscriber: hashar.

Change 180261 had a related patch set uploaded (by QChris):
Make tests' event capsule flag clientValidated as boolean


Change 180261 merged by jenkins-bot:
Make tests' event capsule flag clientValidated as boolean

Any idea why it would fail under HHVM and not under Zend ?

One sure thing, the test pass now:

I saw that the schema verifier took different code paths when figuring out data types.
But HHVM's choice looked saner and right.

The fact that the test passed on Zend is a bug in EventLogging from my point of view.

Do you think it's worth hunting it down?

Ideally we would have a test highlighting the issue. Your call on whether it is important to investigate, my main point was to have the tests to pass in both Zend and HHVM regardless of their usefulness/correctness :)

QChris claimed this task.

Ideally we would have a test highlighting the issue.

If the issue was be the EventLogging code itself, I'd agree.

But here acutally not the EventLogging code, but the EventLogging test was wrong and sent the code into undefined behaviour.

If we'd automatically test against human errors in tests, we'd do tests of tests ... meta-tests :-)