You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alexey Markevich (Jira)" <ji...@apache.org> on 2022/05/02 08:43:00 UTC

[jira] [Resolved] (CXF-8697) 2 Order-Dependent Flaky Tests for CachedOutputStream

     [ https://issues.apache.org/jira/browse/CXF-8697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Markevich resolved CXF-8697.
-----------------------------------
    Resolution: Fixed

> 2 Order-Dependent Flaky Tests for CachedOutputStream 
> -----------------------------------------------------
>
>                 Key: CXF-8697
>                 URL: https://issues.apache.org/jira/browse/CXF-8697
>             Project: CXF
>          Issue Type: Test
>          Components: Core
>    Affects Versions: 4.0.0
>            Reporter: Justin Chen
>            Priority: Trivial
>              Labels: test
>             Fix For: 4.0.0
>
>
> The tests {{org.apache.cxf.io.CacheAndWriteOutputStreamTest.testDeleteTmpFile}} and {{org.apache.cxf.io.CachedOutputStreamTest.testDeleteTmpFile}} fail when run by themselves with the command {{mvn test}} because the temporary file is null. The reason is because {{createFileOutPutStream}} is never called in the method {{enforceLimits}} in the {{CachedOutputStream}} class since the {{threshold}} instance variable is not greater than the {{totalLength}} variable. The threshold variable depends on the static variable {{{}defaultThreshold{}}}. The {{defaultThreshold}} also depends on the system property. Therefore, these tests pass when the whole test suite is run because a different test, such as {{testUseSysProps,}} changes the static variable along with the system property.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)