-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Core] Refactor Runtime #1367
[Core] Refactor Runtime #1367
Conversation
Pulled the branch to work on some changes for PR 1357 and before I've made any changes I'm running the tests (whilst perusing the changes already made for me) and I get the following issue
Just want to start with a clean running state, thanks in advance |
Hey, feel free to comment out the revapi plugin. If you comment out the one
in the plugins section, not the plugin management section it should be
easy.
Not sure what is causing this. Looks like the languages aren't generated.
…On Tue, May 29, 2018, 12:17 boaty82 ***@***.***> wrote:
Pulled the branch to work on some changes for PR 1357
<#1357> and before I've made
any changes I'm running the tests (whilst perusing the changes already made
for me) and I get the following issue
[ERROR] Failed to execute goal org.revapi:revapi-maven-plugin:0.10.2:check (check) on project cucumber-java: The following API problems caused the build to fail:
[ERROR] java.annotation.noLongerPresent: @interface cucumber.api.java.ht.SipozeKe: Old API referenced the annotation type but the new API version no longer does. (breaks semantic versioning)
[ERROR] java.annotation.noLongerPresent: @interface cucumber.api.java.ht.SipozeKe: Old API referenced the annotation type but the new API version no longer does. (breaks semantic versioning)
[ERROR]
[ERROR] If you're using the semver-ignore extension, update your module's version to one compatible with the current changes (e.g. mvn package revapi:update-versions). If you want to explicitly ignore this change and provide a justification for it, add the following JSON snippet to your Revapi configuration under "revapi.ignore" path:
[ERROR] {
[ERROR] "code": "java.annotation.noLongerPresent",
[ERROR] "old": ***@***.*** cucumber.api.java.ht.SipozeKe",
[ERROR] "package": "cucumber.api.java.ht",
[ERROR] "classQualifiedName": "cucumber.api.java.ht.SipozeKe",
[ERROR] "classSimpleName": "SipozeKe",
[ERROR] "elementKind": ***@***.***",
[ERROR] "justification": <<<<< ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE >>>>>
[ERROR] },
...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1367 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGoAZxmQGuXZ3ie0Pj7TVHDZUUPdpDU9ks5t3SA8gaJpZM4UH0Fr>
.
|
@boaty82 You'll also have to comment out the enforcer (fyi ;)) |
I’ve done that. Just thought there might be a more “proper” fix |
No. Don't have a solution yet. There is something going wrong when you run the build. Maybe something executed in the wrong order that causes the languages not to be generated when revapi comes by. |
I've moved the semantic version check to a different profile. Unless you turn it own it only runs on the CI. This slows down the feedback loop a bit, but this is okay because we'll figure out which version it has to go in when merging. Not when building the feature. |
Also feel free to ignore any problems with |
199f9aa
to
3ba1ee7
Compare
OK there are problems in the tests with queueing events, which I've been tracking down for a few hours across the last few days Basically and However,
which doesn't create the wrapper, which it should as this class should be effectively verifying what So if I update the I've tracked the problem down to Just trying to think of a nice way to resolve this, but thoughts are welcome in the mean time. Also, BTW the |
Think I've found a nice solution. I've created a new event I then had to update Just got to double check the tests |
Hey Boaty,
I'd rather not introduce a new event. I don't think it is needed.
The current tests for the formatters are setup such that cucumber generates
a stream of events. For tests we mock the time service so we can tick the
clock manually and get predictable timestamps.
The generation of these events is currently closely tied to the rest of the
implementation and the tests. This was okay in the past. There was only one
ordering of events. Now we have multiple orderings to deal with.
Generating these in a controlled fashion requires first that we make the
concept of an event stream explicit.
An event stream is a sequence of events with some ordering:
[TestStarted, TestSourceRead, {[ScenarioStarted, Step1, Step2,
ScenarioFinished]*}, TestFinished]
[This is in order], {these can come in any order}, these* can repeat.
So by recording a regular event stream and shuffling the groups of scenario
events we can simulate the result of a concurrent execution.
This might also make the implementation of formatters simpler. Rather then
trying to make all the formatters smart, we can record the events and
replay them in the right order (sort the groups of scenario events by uri).
…-MP
PS: Can't look at the code. On a boat.
On Sat, Jun 9, 2018, 09:59 boaty82 ***@***.***> wrote:
I've found a nice solution.
I've created a new event TimerEvent, which StepDurationTimeService now
registers for.
Updated TestStepStarted to implement it
I then had to update EventBus to loop through the handler map and check
if the incoming event is an instance of the class in the key, rather than
getting the key.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1367 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGoAZ1v6qZKGBPHqpoo8Vfw_DVGo9LLMks5t64B7gaJpZM4UH0Fr>
.
|
Hi. Haven't needed to add a new event interface in the end. Managed to just create a new EventBus implementation now, purely for tests, so Have done the changes to support |
JUnit is running Cucumber so the expectation is that JUnit's `@BeforeClass` and `@AfterClass` methods are invoked respectively before and after all events emitted by Cucumber. However because the `TestRunStarted` event was emitted in the constructor of `Cucumber` it would precede the the invocation of `@BeforeClass`. In older versions of Cucumber sending the `TestSourceRead` events was coupled to reading the test sources. This made it impossible to read the features ahead of time -required to to create the test description tree and fail on lexer errors- and send `TestRunStarted` after `@BeforeClass`. This is no longer case since #1367 and so this problem can be resolved.
JUnit is running Cucumber so the expectation is that JUnit's `@BeforeClass` and `@AfterClass` methods are invoked respectively before and after all events emitted by Cucumber. However because the `TestRunStarted` event was emitted in the constructor of `Cucumber` it would precede the the invocation of `@BeforeClass`. In older versions of Cucumber sending the `TestSourceRead` events was coupled to reading the test sources. This made it impossible to read the features ahead of time -required to to create the test description tree and fail on lexer errors- and send `TestRunStarted` after `@BeforeClass`. This is no longer case since #1367 and so this problem can be resolved.
JUnit is running Cucumber so the expectation is that JUnit's `@BeforeClass` and `@AfterClass` methods are invoked respectively before and after all events emitted by Cucumber. However because the `TestRunStarted` event was emitted in the constructor of `Cucumber` it would precede the the invocation of `@BeforeClass`. In older versions of Cucumber sending the `TestSourceRead` events was coupled to reading the test sources. This made it impossible to read the features ahead of time -required to to create the test description tree and fail on lexer errors- and send `TestRunStarted` after `@BeforeClass`. This is no longer case since #1367 and so this problem can be resolved.
JUnit is running Cucumber so the expectation is that JUnit's `@BeforeClass` and `@AfterClass` methods are invoked respectively before and after all events emitted by Cucumber. However because the `TestRunStarted` event was emitted in the constructor of `Cucumber` it would precede the the invocation of `@BeforeClass`. In older versions of Cucumber sending the `TestSourceRead` events was coupled to reading the test sources. This made it impossible to read the features ahead of time -required to to create the test description tree and fail on lexer errors- and send `TestRunStarted` after `@BeforeClass`. This is no longer case since #1367 and so this problem can be resolved.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Extracting:
from the runtime allows