-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For the sake of efficiency and performance we write to buffered writers. However, the pretty plugin is expected to print scenarios as they're started and steps as they're finished. This was initially resolved by flushing the `NiceAppendable` on every write. This turned out to have performance impact (#2481) and interact poorly with tools that expected (#2536) us to be better behaved. By having `NiceAppendable` flush only when the underlying buffer was full these problems were resolved (#2541) . However, because the underlying buffer is 8KiB the pretty formatters output would effectively sit in a buffer until the writer was closed. So now we flush the pretty and progress output manually after each event. This strikes a balance somewhere between the flush-everything-all-the-time and flush-when-full approaches. Fixes: #2563
- Loading branch information
1 parent
0ee15f0
commit f9e6e75
Showing
13 changed files
with
107 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 0 additions & 96 deletions
96
core/src/main/java/io/cucumber/core/plugin/NiceAppendable.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
core/src/main/java/io/cucumber/core/plugin/UTF8PrintWriter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.cucumber.core.plugin; | ||
|
||
import java.io.OutputStream; | ||
import java.io.PrintWriter; | ||
import java.nio.charset.StandardCharsets; | ||
|
||
final class UTF8PrintWriter extends PrintWriter { | ||
|
||
UTF8PrintWriter(OutputStream out) { | ||
super(out, false, StandardCharsets.UTF_8); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
core/src/test/java/io/cucumber/core/plugin/NiceAppendableTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.