Skip to content

Commit a0f0f6c

Browse files
fix(deps): update messages and dependants (major) (#3022)
1 parent 25dbfe5 commit a0f0f6c

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
### Changed
1919
- [JUnit Platform Engine] Use JUnit's `EngineDiscoveryRequestResolver` to resolve classpath based resources. ([#2835](https://github.com/cucumber/cucumber-jvm/pull/2835) M.P. Korstanje)
2020
- [JUnit Platform Engine] Use JUnit Platform 1.13.1 (JUnit Jupiter 5.13.1)
21+
- [Core] Update dependency io.cucumber:gherkin to v33.0.0
22+
- [Core] Update dependency io.cucumber:messages to v28.0.0
2123

2224
### Fixed
2325
- [JUnit Platform Engine] Log discovery issues for feature files with parse errors. ([#2835](https://github.com/cucumber/cucumber-jvm/pull/2835) M.P. Korstanje)

cucumber-bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<properties>
1616
<ci-environment.version>10.0.1</ci-environment.version>
1717
<cucumber-expressions.version>18.0.1</cucumber-expressions.version>
18-
<gherkin.version>32.1.1</gherkin.version>
18+
<gherkin.version>33.0.0</gherkin.version>
1919
<html-formatter.version>21.12.0</html-formatter.version>
2020
<junit-xml-formatter.version>0.7.1</junit-xml-formatter.version>
21-
<messages.version>27.2.0</messages.version>
21+
<messages.version>28.0.0</messages.version>
2222
<query.version>13.3.0</query.version>
2323
<tag-expressions.version>6.1.2</tag-expressions.version>
2424
<testng-xml-formatter.version>0.3.1</testng-xml-formatter.version>

cucumber-core/src/main/java/io/cucumber/core/runner/TestCaseState.java

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import io.cucumber.core.backend.Status;
44
import io.cucumber.core.eventbus.EventBus;
5+
import io.cucumber.messages.Convertor;
56
import io.cucumber.messages.types.Attachment;
67
import io.cucumber.messages.types.AttachmentContentEncoding;
78
import io.cucumber.messages.types.Envelope;
@@ -11,6 +12,7 @@
1112
import io.cucumber.plugin.event.WriteEvent;
1213

1314
import java.net.URI;
15+
import java.time.Instant;
1416
import java.util.ArrayList;
1517
import java.util.Base64;
1618
import java.util.Collection;
@@ -71,7 +73,8 @@ public void attach(byte[] data, String mediaType, String name) {
7173
requireNonNull(mediaType);
7274

7375
requireActiveTestStep();
74-
bus.send(new EmbedEvent(bus.getInstant(), testCase, data, mediaType, name));
76+
Instant instant = bus.getInstant();
77+
bus.send(new EmbedEvent(instant, testCase, data, mediaType, name));
7578
bus.send(Envelope.of(new Attachment(
7679
Base64.getEncoder().encodeToString(data),
7780
AttachmentContentEncoding.BASE64,
@@ -81,7 +84,9 @@ public void attach(byte[] data, String mediaType, String name) {
8184
testExecutionId.toString(),
8285
currentTestStepId.toString(),
8386
null,
84-
null)));
87+
null,
88+
null,
89+
Convertor.toMessage(instant))));
8590
}
8691

8792
@Override
@@ -90,7 +95,8 @@ public void attach(String data, String mediaType, String name) {
9095
requireNonNull(mediaType);
9196

9297
requireActiveTestStep();
93-
bus.send(new EmbedEvent(bus.getInstant(), testCase, data.getBytes(UTF_8), mediaType, name));
98+
Instant instant = bus.getInstant();
99+
bus.send(new EmbedEvent(instant, testCase, data.getBytes(UTF_8), mediaType, name));
94100
bus.send(Envelope.of(new Attachment(
95101
data,
96102
AttachmentContentEncoding.IDENTITY,
@@ -100,13 +106,16 @@ public void attach(String data, String mediaType, String name) {
100106
testExecutionId.toString(),
101107
currentTestStepId.toString(),
102108
null,
103-
null)));
109+
null,
110+
null,
111+
Convertor.toMessage(instant))));
104112
}
105113

106114
@Override
107115
public void log(String text) {
108116
requireActiveTestStep();
109-
bus.send(new WriteEvent(bus.getInstant(), testCase, text));
117+
Instant instant = bus.getInstant();
118+
bus.send(new WriteEvent(instant, testCase, text));
110119
bus.send(Envelope.of(new Attachment(
111120
text,
112121
AttachmentContentEncoding.IDENTITY,
@@ -116,7 +125,9 @@ public void log(String text) {
116125
testExecutionId.toString(),
117126
currentTestStepId.toString(),
118127
null,
119-
null)));
128+
null,
129+
null,
130+
Convertor.toMessage(instant))));
120131
}
121132

122133
@Override

0 commit comments

Comments
 (0)