Skip to content
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

[PDI-17274] during metadata injection of constant values allocate spa… #6315

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

NJtwentyone
Copy link
Contributor

…ce for collections

  • update BeanInjector.setProperty(...) to include allocateCollectionField(...)

@wingman-pentaho
Copy link
Collaborator

Build Completed

❌ This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.

Build Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files

  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjectionInfo.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanLevelInfo.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel1.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel2.java
  engine/src/test/java/org/pentaho/di/core/injection/bean/BeanInjectorTest.java
  plugins/meta-inject/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInject.java

Newly Broken Tests:

org.pentaho.di.core.lifecycle.KettleLifecycleSupportTest.testOnEnvironmentInit:

🔴 org.mockito.exceptions.misusing.UnfinishedStubbingException

org.mockito.exceptions.misusing.UnfinishedStubbingException: 

Unfinished stubbing detected here:
-> at org.pentaho.di.core.injection.bean.BeanInjectorTest.getCollectionSize_BeanLevelInfo_Exception(BeanInjectorTest.java:350)

E.g. thenReturn() may be missing.
Examples of correct stubbing:
    when(mock.isOk()).thenReturn(true);
    when(mock.isOk()).thenThrow(exception);
    doThrow(exception).when(mock).someVoidMethod();
Hints:
 1. missing thenReturn()
 2. you are trying to stub a final method,

Unit Test Coverage

These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

⚠️ Coverage Changes (click to expand)
org.pentaho.di.core.lifecycle.KettleLifecycleSupport
  • Branch Change: -41.7% 🔻
  • Complexity Change: -45.4% 🔻
  • Instruction Change: -25.8% 🔻
  • Line Change: -28.9% 🔻
  • Method Change: -20% 🔻
org.pentaho.di.core.lifecycle.LifecycleSupport
  • Branch Change: -16.6% 🔻
  • Complexity Change: -12.5% 🔻
  • Instruction Change: -12.9% 🔻
  • Line Change: -11.6% 🔻
org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL
  • Branch Change: -0.8% 🔻
  • Complexity Change: -1% 🔻
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.ifnull.IfNullMeta
  • Branch Change: -2% 🔻
  • Complexity Change: -1.9% 🔻
  • Instruction Change: -0.2% 🔻
org.pentaho.di.trans.steps.ldapoutput.LDAPOutputMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta
  • Branch Change: -1.1% 🔻
  • Complexity Change: -1.3% 🔻
  • Instruction Change: -0.1% 🔻
  • Line Change: -0.4% 🔻
org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTransMeta
  • Branch Change: -3.3% 🔻
  • Complexity Change: -1.8% 🔻
  • Instruction Change: -0.3% 🔻
org.pentaho.di.trans.steps.tableoutput.TableOutputMeta
  • Branch Change: -0.9% 🔻
  • Complexity Change: -0.8% 🔻
org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsertMeta
  • Instruction Change: -0.1% 🔻

License header violations

❗ Copyright year is not the current year on engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjectionInfo.java. Found 2017. Was expecting 2019

❗ Copyright year is not the current year on engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java. Found 2018. Was expecting 2019

❗ Copyright year is not the current year on engine/src/main/java/org/pentaho/di/core/injection/bean/BeanLevelInfo.java. Found 2017. Was expecting 2019

❗ Copyright year is not the current year on engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel1.java. Found 2017. Was expecting 2019

❗ Copyright year is not the current year on engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel2.java. Found 2017. Was expecting 2019

❗ Couldn't find acceptable copyright on engine/src/test/java/org/pentaho/di/core/injection/bean/BeanInjectorTest.java

❗ Couldn't find acceptable license on engine/src/test/java/org/pentaho/di/core/injection/bean/BeanInjectorTest.java

❗ Copyright year is not the current year on plugins/meta-inject/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInject.java. Found 2018. Was expecting 2019

Checkstyle violations

The code submitted is not complying with one or more of our guidelines. To perform these checks locally, please use this tool.

/home/buildguy/project/engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java

❗ Unused import - org.pentaho.di.trans.step.StepMetaInterface. at Line: 28 Column: 8

❗ ')' is not preceded with whitespace. at Line: 440 Column: 54

❗ 'method def' child has incorrect indentation level 5, expected level should be 4. at Line: 534

@wingman-pentaho
Copy link
Collaborator

Build Completed

❌ This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.

Build Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files

  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjectionInfo.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanLevelInfo.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel1.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel2.java
  engine/src/test/java/org/pentaho/di/core/injection/bean/BeanInjectorTest.java
  plugins/meta-inject/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInject.java

Newly Broken Tests:

org.pentaho.di.core.lifecycle.KettleLifecycleSupportTest.testOnEnvironmentInit:

🔴 org.mockito.exceptions.misusing.UnfinishedStubbingException

org.mockito.exceptions.misusing.UnfinishedStubbingException: 

Unfinished stubbing detected here:
-> at org.pentaho.di.core.injection.bean.BeanInjectorTest.getCollectionSize_BeanLevelInfo_Exception(BeanInjectorTest.java:373)

E.g. thenReturn() may be missing.
Examples of correct stubbing:
    when(mock.isOk()).thenReturn(true);
    when(mock.isOk()).thenThrow(exception);
    doThrow(exception).when(mock).someVoidMethod();
Hints:
 1. missing thenReturn()
 2. you are trying to stub a final method,

Unit Test Coverage

These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

⚠️ Coverage Changes (click to expand)
org.pentaho.di.core.lifecycle.KettleLifecycleSupport
  • Branch Change: -41.7% 🔻
  • Complexity Change: -45.4% 🔻
  • Instruction Change: -25.8% 🔻
  • Line Change: -28.9% 🔻
  • Method Change: -20% 🔻
org.pentaho.di.core.lifecycle.LifecycleSupport
  • Branch Change: -16.6% 🔻
  • Complexity Change: -12.5% 🔻
  • Instruction Change: -12.9% 🔻
  • Line Change: -11.6% 🔻
org.pentaho.di.job.entries.sql.JobEntrySQL
  • Instruction Change: -3.4% 🔻
  • Line Change: -3.8% 🔻
org.pentaho.di.trans.steps.calculator.CalculatorMetaFunction
  • Branch Change: -8.7% 🔻
  • Complexity Change: -3% 🔻
  • Instruction Change: -0.7% 🔻
  • Line Change: -0.9% 🔻
org.pentaho.di.trans.steps.datagrid.DataGridMeta
  • Branch Change: -2% 🔻
  • Complexity Change: -1.7% 🔻
  • Instruction Change: -0.2% 🔻
org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta
  • Method Change: -1% 🔻
org.pentaho.di.trans.steps.sort.SortRowsMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.tableoutput.TableOutputMeta
  • Branch Change: -0.9% 🔻
  • Complexity Change: -0.8% 🔻

Checkstyle violations

The code submitted is not complying with one or more of our guidelines. To perform these checks locally, please use this tool.

/home/buildguy/project/engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java

❗ 'method def' child has incorrect indentation level 5, expected level should be 4. at Line: 533

@wingman-pentaho
Copy link
Collaborator

Build Completed

❌ This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.

Build Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files

  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjectionInfo.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanLevelInfo.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel1.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel2.java
  engine/src/test/java/org/pentaho/di/core/injection/bean/BeanInjectorTest.java
  plugins/meta-inject/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInject.java

Newly Broken Tests:

org.pentaho.di.core.lifecycle.KettleLifecycleSupportTest.testOnEnvironmentInit:

🔴 org.mockito.exceptions.misusing.UnfinishedStubbingException

org.mockito.exceptions.misusing.UnfinishedStubbingException: 

Unfinished stubbing detected here:
-> at org.pentaho.di.core.injection.bean.BeanInjectorTest.getCollectionSize_BeanLevelInfo_Exception(BeanInjectorTest.java:373)

E.g. thenReturn() may be missing.
Examples of correct stubbing:
    when(mock.isOk()).thenReturn(true);
    when(mock.isOk()).thenThrow(exception);
    doThrow(exception).when(mock).someVoidMethod();
Hints:
 1. missing thenReturn()
 2. you are trying to stub a final method,

Unit Test Coverage

These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

⚠️ Coverage Changes (click to expand)
org.pentaho.di.core.lifecycle.KettleLifecycleSupport
  • Branch Change: -41.7% 🔻
  • Complexity Change: -45.4% 🔻
  • Instruction Change: -25.8% 🔻
  • Line Change: -28.9% 🔻
  • Method Change: -20% 🔻
org.pentaho.di.core.lifecycle.LifecycleSupport
  • Branch Change: -16.6% 🔻
  • Complexity Change: -12.5% 🔻
  • Instruction Change: -12.9% 🔻
  • Line Change: -11.6% 🔻
org.pentaho.di.trans.steps.constant.ConstantMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.dbproc.DBProcMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.ldapoutput.LDAPOutputMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.pgbulkloader.PGBulkLoaderMeta
  • Branch Change: -1.8% 🔻
  • Complexity Change: -0.9% 🔻
  • Instruction Change: -0.2% 🔻
  • Line Change: -0.3% 🔻
org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta
  • Branch Change: -2.6% 🔻
  • Complexity Change: -1.5% 🔻
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.sort.SortRowsMeta
  • Instruction Change: -0.1% 🔻

…ce for collections

- update BeanInjector.setProperty(...) to include allocateCollectionField(...)
@wingman-pentaho
Copy link
Collaborator

Build Completed

🔥 This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.

Build Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands

mvn -B -f 'pom.xml' -pl 'engine,plugins/meta-inject' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files

  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjectionInfo.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanInjector.java
  engine/src/main/java/org/pentaho/di/core/injection/bean/BeanLevelInfo.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel1.java
  engine/src/test/java/org/pentaho/di/core/injection/MetaBeanLevel2.java
  engine/src/test/java/org/pentaho/di/core/injection/bean/BeanInjectorTest.java
  plugins/meta-inject/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInject.java

Unit Test Coverage

These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

⚠️ Coverage Changes (click to expand)
org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent
  • Branch Change: -1.1% 🔻
  • Complexity Change: -1.1% 🔻
  • Instruction Change: -0.1% 🔻
org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL
  • Branch Change: -0.8% 🔻
  • Complexity Change: -1% 🔻
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.constant.ConstantMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.dbproc.DBProcMeta
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta
  • Branch Change: -1.1% 🔻
  • Complexity Change: -1.3% 🔻
org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta
  • Branch Change: -2.6% 🔻
  • Complexity Change: -1.5% 🔻
  • Instruction Change: -0.1% 🔻
org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTransMeta
  • Branch Change: -3.3% 🔻
  • Complexity Change: -1.8% 🔻
  • Instruction Change: -0.3% 🔻
org.pentaho.di.trans.steps.textfileinput.TextFileInputMeta
  • Branch Change: -0.5% 🔻
org.pentaho.di.trans.steps.salesforceupdate.SalesforceUpdateMeta
  • Instruction Change: -0.2% 🔻

@NJtwentyone
Copy link
Contributor Author

@pentaho/r2d2 please review

@bmorrise bmorrise merged commit 36d51ea into pentaho:master Mar 7, 2019
angel-ramoscardona pushed a commit to angel-ramoscardona/pentaho-kettle that referenced this pull request Mar 18, 2019
…ce for collections (pentaho#6315)

- update BeanInjector.setProperty(...) to include allocateCollectionField(...)
@NJtwentyone NJtwentyone deleted the issues/8.3/pr/pdi-17274 branch March 22, 2019 16:35
NJtwentyone added a commit to NJtwentyone/pentaho-kettle that referenced this pull request Mar 26, 2019
…ce for collections (pentaho#6315)

- update BeanInjector.setProperty(...) to include allocateCollectionField(...)
NJtwentyone added a commit to NJtwentyone/pentaho-kettle that referenced this pull request Mar 27, 2019
…ce for collections (pentaho#6315)

- update BeanInjector.setProperty(...) to include allocateCollectionField(...)
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.

3 participants