geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (GEODE-734) gfsh export stack-traces should not require an output file with extension .txt
Date Thu, 01 Dec 2016 18:30:58 GMT


ASF GitHub Bot commented on GEODE-734:

Github user kirklund commented on a diff in the pull request:
    --- Diff: geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/
    @@ -149,4 +163,92 @@ public void testExportStacktrace() throws ClassNotFoundException,
IOException {
         getLogWriter().info("Output : \n" + commandResultToString(commandResult));
    +  /***
    +   * Tests the behavior of the show stack-trace command when file is already present
    +   *
    +   * @throws ClassNotFoundException
    +   * @throws IOException
    +   */
    +  @Test
    --- End diff --
    This looks like three different tests all inside one test. It's better to separate these
so they're shorter, more readable and pass or fail independently of one another.
    If you're worried about how long it takes to setup/teardown or run tests, then you really
should consider testing this feature in a UnitTest or IntegrationTest.
    UnitTest would use Mockito to help you isolate the one class for test (UnitTest shouldn't
touch file system or network). IntegrationTest would allow you to touch file system or network,
test group of classes, or create one Geode member (in one JVM). DistributedTest should only
be used when you really need more than one member (multiple JVMs).

> gfsh export stack-traces should not require an output file with extension .txt
> ------------------------------------------------------------------------------
>                 Key: GEODE-734
>                 URL:
>             Project: Geode
>          Issue Type: Improvement
>          Components: gfsh
>            Reporter: Jens Deppe
> gfsh {{export stack-traces}} requires a file with a {{.txt}} extension:
> {noformat}
> gfsh>export stack-traces --file=/tmp/trace.log
> Invalid file type, the file extension must be ".txt"
> {noformat}
> This seems like a totally arbitrary restriction. Please can it be removed.
> If the concern is that an existing file might be overwritten then we should have a user
prompt indicating that.

This message was sent by Atlassian JIRA

View raw message