You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/04 14:36:00 UTC

[jira] [Commented] (FLINK-7053) improve code quality in some tests

    [ https://issues.apache.org/jira/browse/FLINK-7053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114444#comment-16114444 ] 

ASF GitHub Bot commented on FLINK-7053:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4234#discussion_r131401070
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheSuccessTest.java ---
    @@ -92,15 +100,15 @@ private void uploadFileGetTest(final Configuration config, boolean cacheWorksWit
     		BlobCache blobCache = null;
     		BlobStoreService blobStoreService = null;
     		try {
    -			final Configuration cacheConfig;
    -			if (cacheHasAccessToFs) {
    -				cacheConfig = config;
    -			} else {
    -				// just in case parameters are still read from the server,
    -				// create a separate configuration object for the cache
    -				cacheConfig = new Configuration(config);
    +			final Configuration cacheConfig = new Configuration(config);
    +			cacheConfig.setString(BlobServerOptions.STORAGE_DIRECTORY,
    +				temporaryFolder.newFolder().getAbsolutePath());
    +			if (!cacheHasAccessToFs) {
    +				// make sure the cache cannot access the HA store directly
    +				cacheConfig.setString(BlobServerOptions.STORAGE_DIRECTORY,
    +					temporaryFolder.newFolder().getAbsolutePath());
    --- End diff --
    
    isn't this redundant?


> improve code quality in some tests
> ----------------------------------
>
>                 Key: FLINK-7053
>                 URL: https://issues.apache.org/jira/browse/FLINK-7053
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Distributed Coordination, Network
>    Affects Versions: 1.4.0
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>
> * {{BlobClientTest}} and {{BlobClientSslTest}} share a lot of common code
> * the received buffers there are currently not verified for being equal to the expected one
> * {{TemporaryFolder}} should be used throughout blob store tests



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)