[jira] [Commented] (OFBIZ-12453) testInvoicePerShipmentSetFalse work with runtime configuration data

2022-04-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17517966#comment-17517966
 ] 

ASF subversion and git services commented on OFBIZ-12453:
-

Commit a3068004a1423e5f3665396e2a756f5c8dda64f1 in ofbiz-framework's branch 
refs/heads/trunk from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=a3068004a1 ]

Fixed: testInvoicePerShipmentSetFalse work with runtime configuration data 
(OFBIZ-12453)

UtilProperties::setPropertyValueInMemory was only based on files. Thinking by
analogy, as Pierre pushed SystemProperties with OFBIZ-6189, I thought that by
adding an UtilProperties::setPropertyValueInMemory based on
EntityUtilProperties::getProperties it would resolve the issue. But it did not.

Looking closer at the code, I wondered why 
UtilProperties::setPropertyValueInMemory
was used at all.

This fixes the issue by simply removing setPropertyValueInMemory and setting "Y"
or "N" when calling testInvoicePerShipment.

It though keeps the new UtilProperties::setPropertyValueInMemory variant


> testInvoicePerShipmentSetFalse work with runtime configuration data
> ---
>
> Key: OFBIZ-12453
> URL: https://issues.apache.org/jira/browse/OFBIZ-12453
> Project: OFBiz
>  Issue Type: Bug
>  Components: accounting
>Affects Versions: Trunk, Upcoming Branch
>Reporter: Pierre Smits
>Assignee: Jacques Le Roux
>Priority: Major
>  Labels: integration-test, test-failure
>
> The testInvoicePerShipmentSetFalse fails when the following is loaded into 
> the SystemProperty table and the test is executed.
> {code:java}
>  systemPropertyId="create.invoice.per.shipment" 
> systemPropertyValue="Y"
> description="create invoice per shipment. Options: = Y (Invoice per 
> shipment), N (Invoice per order)"/> {code}
> See 
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/InvoicePerShipmentTests.groovy



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (OFBIZ-12453) testInvoicePerShipmentSetFalse work with runtime configuration data

2022-04-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17517963#comment-17517963
 ] 

ASF subversion and git services commented on OFBIZ-12453:
-

Commit 4a5b0f829b0e834e70631a64e5b0c53cbe3d836e in ofbiz-framework's branch 
refs/heads/release22.01 from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=4a5b0f829b ]

Fixed: testInvoicePerShipmentSetFalse work with runtime configuration data 
(OFBIZ-12453)

UtilProperties::setPropertyValueInMemory was only based on files. Thinking by
analogy, as Pierre pushed SystemProperties with OFBIZ-6189, I thought that by
adding an UtilProperties::setPropertyValueInMemory based on
EntityUtilProperties::getProperties it would resolve the issue. But it did not.

Looking closer at the code, I wondered why 
UtilProperties::setPropertyValueInMemory
was used at all.

This fixes the issue by simply removing setPropertyValueInMemory and setting "Y"
or "N" when calling testInvoicePerShipment.

It though keeps the new UtilProperties::setPropertyValueInMemory variant


> testInvoicePerShipmentSetFalse work with runtime configuration data
> ---
>
> Key: OFBIZ-12453
> URL: https://issues.apache.org/jira/browse/OFBIZ-12453
> Project: OFBiz
>  Issue Type: Bug
>  Components: accounting
>Affects Versions: Trunk, Upcoming Branch
>Reporter: Pierre Smits
>Assignee: Jacques Le Roux
>Priority: Major
>  Labels: integration-test, test-failure
>
> The testInvoicePerShipmentSetFalse fails when the following is loaded into 
> the SystemProperty table and the test is executed.
> {code:java}
>  systemPropertyId="create.invoice.per.shipment" 
> systemPropertyValue="Y"
> description="create invoice per shipment. Options: = Y (Invoice per 
> shipment), N (Invoice per order)"/> {code}
> See 
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/InvoicePerShipmentTests.groovy



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (OFBIZ-12453) testInvoicePerShipmentSetFalse work with runtime configuration data

2022-01-28 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483685#comment-17483685
 ] 

Jacques Le Roux commented on OFBIZ-12453:
-

Hi Pierre,

This is fundamentally wrong. The testIntegration Gradle task and actually all 
integration tests are supposed to be run after a "gradlew cleanAll loadAll" or 
at least a "gradlew cleanData loadAll". You may add new tests to prove your 
cases but as long as testIntegration Gradle task is OK there are no reasons to 
call what you raise a bug. Please close and create an improvement Jira to prove 
your case with new integration test/s, TIA

> testInvoicePerShipmentSetFalse work with runtime configuration data
> ---
>
> Key: OFBIZ-12453
> URL: https://issues.apache.org/jira/browse/OFBIZ-12453
> Project: OFBiz
>  Issue Type: Bug
>  Components: accounting
>Affects Versions: Trunk, Upcoming Branch
>Reporter: Pierre Smits
>Priority: Major
>  Labels: integration-test, test-failure
>
> The testInvoicePerShipmentSetFalse fails when the following is loaded into 
> the SystemProperty table and the test is executed.
> {code:java}
>  systemPropertyId="create.invoice.per.shipment" 
> systemPropertyValue="Y"
> description="create invoice per shipment. Options: = Y (Invoice per 
> shipment), N (Invoice per order)"/> {code}
> See 
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/InvoicePerShipmentTests.groovy



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (OFBIZ-12453) testInvoicePerShipmentSetFalse work with runtime configuration data

2021-12-13 Thread Pierre Smits (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17458360#comment-17458360
 ] 

Pierre Smits commented on OFBIZ-12453:
--

Using the test with following in code:
{code:java}
void testInvoicePerShipmentSetFalse() {
        /* Test Invoice Per Shipment
            Step 1) Set create.invoice.per.shipment=N in accounting.properties 
file.
            Step 2) Create order and approve order.
            Step 3) Pack Shipment For Ship Group.
            Step 4) Check invoice should not created.
        */
        //UtilProperties.setPropertyValueInMemory("accounting", 
"create.invoice.per.shipment", "N")
        //logInfo("= >>> Set Accounting.properties / 
create.invoice.per.shipment = N")


        List invoices = testInvoicePerShipment("GZ-1000", "N")
        assert UtilValidate.isEmpty(invoices)
    } {code}
results in:
{code:java}
assert ServiceUtil.isSuccess(serviceResult) | | false ['shipmentId':'EMPTY', 
'errorMessage':'No items currently set to be shipped. Cannot complete!', 
'responseMessage':'error']

Assertion failed: 

assert ServiceUtil.isSuccess(serviceResult)
| |
false ['shipmentId':'EMPTY', 'errorMessage':'No items currently set to be 
shipped. Cannot complete!', 'responseMessage':'error']

at 
org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:415)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670)
at 
org.apache.ofbiz.accounting.InvoicePerShipmentTests.testInvoicePerShipment(InvoicePerShipmentTests.groovy:137)
at 
org.apache.ofbiz.accounting.InvoicePerShipmentTests.testInvoicePerShipmentSetFalse(InvoicePerShipmentTests.groovy:154)
at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:90)
at 
org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:153)
at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:77)
at 
org.apache.ofbiz.base.start.StartupControlPanel.loadContainers(StartupControlPanel.java:146)
at 
org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:70)
at org.apache.ofbiz.base.start.Start.main(Start.java:89) {code}

> testInvoicePerShipmentSetFalse work with runtime configuration data
> ---
>
> Key: OFBIZ-12453
> URL: https://issues.apache.org/jira/browse/OFBIZ-12453
> Project: OFBiz
>  Issue Type: Improvement
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Pierre Smits
>Priority: Major
>  Labels: integration-test, test-failure
>
> The testInvoicePerShipmentSetFalse fails when the following is loaded into 
> the SystemProperty table and the test is executed.
> {code:java}
>  systemPropertyId="create.invoice.per.shipment" 
> systemPropertyValue="Y"
> description="create invoice per shipment. Options: = Y (Invoice per 
> shipment), N (Invoice per order)"/> {code}
> See 
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/InvoicePerShipmentTests.groovy



--
This message was sent by Atlassian Jira
(v8.20.1#820001)