FAQ
Hello guys,

Now, I'm testing.
When failed result in single test occur, I want to stop whole testing even
if there are subsequent unittest.

How should I do to manage that??

Thank you in advance.


Harry.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Matt Harden at Feb 20, 2016 at 2:09 am
    os.Exit should do it, but this is not normally done.
    On Fri, Feb 19, 2016 at 1:24 AM Harry wrote:

    Hello guys,

    Now, I'm testing.
    When failed result in single test occur, I want to stop whole testing even
    if there are subsequent unittest.

    How should I do to manage that??

    Thank you in advance.


    Harry.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Harry at Feb 20, 2016 at 10:44 am
    I tried that, however while testing, even if using os.exit, another
    goroutine would be run.

    2016年2月20日土曜日 11時09分33秒 UTC+9 Matt Harden:
    os.Exit should do it, but this is not normally done.

    On Fri, Feb 19, 2016 at 1:24 AM Harry <hiro...@gmail.com <javascript:>>
    wrote:
    Hello guys,

    Now, I'm testing.
    When failed result in single test occur, I want to stop whole testing
    even if there are subsequent unittest.

    How should I do to manage that??

    Thank you in advance.


    Harry.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jan Mercl at Feb 20, 2016 at 10:50 am

    On Sat, Feb 20, 2016 at 11:44 AM Harry wrote:

    I tried that, however while testing, even if using os.exit, another
    goroutine would be run.

    Call to os.Exit terminates the process. All goroutines live within that
    process therefore after terminating a process none of its goroutines can
    continue execution. Perhaps you're observing child processes instead?
    --

    -j

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Harry at Feb 20, 2016 at 11:33 am
    Thank you Jan, I try that as your advice!!


    2016年2月20日土曜日 19時50分35秒 UTC+9 Jan Mercl:

    On Sat, Feb 20, 2016 at 11:44 AM Harry <hiro...@gmail.com <javascript:>>
    wrote:
    I tried that, however while testing, even if using os.exit, another
    goroutine would be run.

    Call to os.Exit terminates the process. All goroutines live within that
    process therefore after terminating a process none of its goroutines can
    continue execution. Perhaps you're observing child processes instead?
    --

    -j
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Dave Cheney at Feb 20, 2016 at 2:10 am
    Why do you want to stop if one test fails?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Harry at Feb 20, 2016 at 10:57 am
    Our team's unittests require SQS messages on AWS,
    In advance test data have to be created in unittest.
    Of course it's done automatically from unittest.

    Each unittests need specific data respectively, it's not common.
    When something errors or fails occur in unittest, created data for test
    have to be purged.
    But api for purging sqs messages on AWS has something restriction in terms
    of time required for purging data.

    if incorrect data left on AWS, following unittest would be failed.
    Our unittests have not been stable yet.


    2016年2月20日土曜日 11時10分34秒 UTC+9 Dave Cheney:
    Why do you want to stop if one test fails?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Dave Cheney at Feb 20, 2016 at 11:33 am
    Would you consider using something like gocheck, or another func test harness to give before and after test functions that would let you reset your test fixtures?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Harry at Feb 20, 2016 at 11:50 am
    I've never tried go check though I'm using testify, I think it's not
    necessarily to have to use.
    I defined setUp func and tearDown func for whole tests to create common
    data for test.
    In addition, I defined similar func for each tests to careate indivisual
    test data.



    2016年2月20日土曜日 20時33分46秒 UTC+9 Dave Cheney:
    Would you consider using something like gocheck, or another func test
    harness to give before and after test functions that would let you reset
    your test fixtures?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 19, '16 at 9:23a
activeFeb 20, '16 at 11:50a
posts9
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase