Skip to content

spline #1011 test data generator module#1012

Merged
AdrianOlosutean merged 10 commits into
developfrom
feature/spline-1011-test-data-generator
Feb 7, 2022
Merged

spline #1011 test data generator module#1012
AdrianOlosutean merged 10 commits into
developfrom
feature/spline-1011-test-data-generator

Conversation

@AdrianOlosutean
Copy link
Copy Markdown
Contributor

Closes #1011
Added module for generating data for spline producer

@AdrianOlosutean AdrianOlosutean force-pushed the feature/spline-1011-test-data-generator branch from 94bbfc9 to 5973323 Compare January 27, 2022 14:11
@AdrianOlosutean AdrianOlosutean self-assigned this Jan 28, 2022
Comment thread test-data-generator/pom.xml Outdated
Comment thread test-data-generator/pom.xml Outdated
Comment thread test-data-generator/pom.xml
Comment thread test-data-generator/pom.xml
Comment thread test-data-generator/src/main/scala/EventGenerator.scala Outdated
…-v1.1' into feature/spline-1011-test-data-generator
…1-test-data-generator

# Conflicts:
#	test-data-generator/src/main/scala/EventGenerator.scala
Copy link
Copy Markdown
Contributor

@wajda wajda left a comment

Choose a reason for hiding this comment

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

In addition to the other comments, please move all the module source code to a corresponding package, say za.co.absa.spline.testdatagen. Also the directory src/test/java should be renamed to src/test/scala since it contains Scala files.

programName("test-data-generator"),
head(
s"""
|Spline Data Generator
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
|Spline Data Generator
|Spline Test Data Generator

import org.scalatest.funsuite.AnyFunSuite
import za.co.absa.spline.producer.model.v1_2.{DataOperation, ExecutionEvent}

class PlanGeneratorTest extends AnyFunSuite {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In Spline, we rather prefer using BDD style for writing test. I'm not against AnyFunSuite per se, but AnyFlatSpec combined with should.Matchers offers more natural DSL for writing BDD style tests. Consider using that one. And instead of testing methods (generateWrite, generateRead) focus on cases (it should "generate one Write and two Reads when this and that condition is given" in { ... }").

@wajda
Copy link
Copy Markdown
Contributor

wajda commented Feb 4, 2022

Also, send-plan.sh why is it located in the resources? Those are meant rather for runtime usage and by default are copied into the target jar-file. That shell script is not a source code, so I would put it somewhere outside the src/ folder, e.g. right into the root module directory, or a bin/ directory if you wish.

@wajda
Copy link
Copy Markdown
Contributor

wajda commented Feb 4, 2022

Sorry for flooding with comments, since in this PR we are creating a new module that is meant to be a CLI tool it would make sense to finish the POM part accordingly. Could you please add a maven-assembly-plugin to build an executable final JAR artifact. (See the admin/pom.xml for example).

Comment thread test-data-generator/pom.xml Outdated
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@wajda wajda left a comment

Choose a reason for hiding this comment

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

LGTM

@AdrianOlosutean AdrianOlosutean merged commit aefde05 into develop Feb 7, 2022
@AdrianOlosutean AdrianOlosutean deleted the feature/spline-1011-test-data-generator branch February 7, 2022 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Test Data Generator Module

2 participants