Skip to content
New issue

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

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

Already on GitHub? # to your account

Introduce Avro plugin #2152

Merged
merged 2 commits into from
Nov 8, 2021
Merged

Introduce Avro plugin #2152

merged 2 commits into from
Nov 8, 2021

Conversation

valfirst
Copy link
Collaborator

@valfirst valfirst commented Nov 6, 2021

No description provided.

@codecov
Copy link

codecov bot commented Nov 6, 2021

Codecov Report

Merging #2152 (ff3d7ee) into master (e940cb4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2152   +/-   ##
=========================================
  Coverage     96.21%   96.21%           
- Complexity     5362     5366    +4     
=========================================
  Files           757      758    +1     
  Lines         15318    15336   +18     
  Branches       1031     1030    -1     
=========================================
+ Hits          14738    14756   +18     
  Misses          450      450           
  Partials        130      130           
Impacted Files Coverage Δ
...rc/main/java/org/vividus/avro/steps/AvroSteps.java 100.00% <100.00%> (ø)
...src/main/java/org/vividus/bdd/steps/FileSteps.java 100.00% <100.00%> (ø)
...c/main/java/org/vividus/softassert/SoftAssert.java 89.78% <0.00%> (-0.36%) ⬇️
...org/vividus/configuration/PropertiesDecryptor.java 100.00% <0.00%> (ø)
.../main/java/org/vividus/proxy/steps/ProxySteps.java 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e940cb4...ff3d7ee. Read the comment docs.

Comment on lines 69 to 71
LOGGER.atInfo()
.addArgument(() -> dataFileReader.getSchema().toString(false))
.log("Avro schema: {}");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
LOGGER.atInfo()
.addArgument(() -> dataFileReader.getSchema().toString(false))
.log("Avro schema: {}");
LOGGER.atInfo()
.addArgument(() -> dataFileReader.getSchema().toString(false))
.log("Avro schema: {}");

Comment on lines 51 to 54
Set<VariableScope> scopes = Set.of(VariableScope.STORY);
String variableName = "varName";
avroSteps.convertAvroDataToJson("/event-message.avro", scopes, variableName);
verify(bddVariableContext).putVariable(scopes, variableName, "[{\"SequenceNumber\": 0, \"Offset\": \"0\", "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Set<VariableScope> scopes = Set.of(VariableScope.STORY);
String variableName = "varName";
avroSteps.convertAvroDataToJson("/event-message.avro", scopes, variableName);
verify(bddVariableContext).putVariable(scopes, variableName, "[{\"SequenceNumber\": 0, \"Offset\": \"0\", "
var scopes = Set.of(VariableScope.STORY);
var variableName = "varName";
avroSteps.convertAvroDataToJson("/event-message.avro", scopes, variableName);
verify(bddVariableContext).putVariable(scopes, variableName, "[{\"SequenceNumber\": 0, \"Offset\": \"0\", "

@@ -53,11 +54,12 @@
*/
@When("I create temporary file with name `$name` and content `$content` and put path to $scopes variable"
+ " `$variableName`")
public void saveResponseBodyToFile(String name, String content, Set<VariableScope> scopes, String variableName)
public void createTemporaryFile(String name, DataWrapper content, Set<VariableScope> scopes, String variableName)
Copy link
Member

Choose a reason for hiding this comment

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

could you please add an integration test for the case with binary data

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's added as a part of Avro test

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 8, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@valfirst valfirst merged commit d866507 into master Nov 8, 2021
@valfirst valfirst deleted the add-avro-plugin branch November 8, 2021 09:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants