You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Neha Narkhede <ne...@gmail.com> on 2013/01/25 18:39:43 UTC

Unit test failure stack traces

Hi Joe,

The SBT upgrade patch broke the behavior of unit tests and I'm not sure how
to proceed here. If unit tests fail, sbt hides the stack traces now, which
is good. But what is the command that can print those per test ?

Thanks,
Neha

Re: Unit test failure stack traces

Posted by Joe Stein <cr...@gmail.com>.
Hi Neha,

did some digging and came accross this.

./sbt
set every traceLevel := 10
test

we can either document it on our wiki or we can set the trace level to a
higher number in build.sbt (i.e. traceLevel := 10)

let me know how it goes

excerpt from http://www.scala-sbt.org/release/docs/Howto/logging.html#trace

Configure printing of stack
tracesĀ¶<http://www.scala-sbt.org/release/docs/Howto/logging.html#trace>

By default, sbt hides the stack trace of most exceptions thrown during
execution. It prints a message that indicates how to display the exception.
However, you may want to show more of stack traces by default.

The setting to configure is traceLevel, which is a setting with an Int
value. When traceLevel is set to a negative value, no stack traces are
shown. When it is zero, the stack trace is displayed up to the first sbt
stack frame. When positive, the stack trace is shown up to that many stack
frames.

For example, the following configures sbt to show stack traces up to the
first sbt frame:

> set every traceLevel := 0

The every part means to override the setting in all scopes. To change the
trace printing behavior for a single project, configuration, or task, scope
traceLevel appropriately:

> set traceLevel in Test := 5> set traceLevel in update := 0> set traceLevel in ThisProject := -1


On Fri, Jan 25, 2013 at 7:23 PM, Joe Stein <cr...@gmail.com> wrote:

> Not sure off hand will look into it.
>
> /*
> Joe Stein, Chief Architect
> http://www.medialets.com
> Twitter: @allthingshadoop
> Mobile: 917-597-9771
> */
>
> On Jan 25, 2013, at 12:39 PM, Neha Narkhede <ne...@gmail.com>
> wrote:
>
> > Hi Joe,
> >
> > The SBT upgrade patch broke the behavior of unit tests and I'm not sure
> how
> > to proceed here. If unit tests fail, sbt hides the stack traces now,
> which
> > is good. But what is the command that can print those per test ?
> >
> > Thanks,
> > Neha
>



-- 

/*
Joe Stein
http://www.linkedin.com/in/charmalloc
Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
*/

Re: Unit test failure stack traces

Posted by Joe Stein <cr...@gmail.com>.
Not sure off hand will look into it.

/*
Joe Stein, Chief Architect
http://www.medialets.com
Twitter: @allthingshadoop
Mobile: 917-597-9771
*/

On Jan 25, 2013, at 12:39 PM, Neha Narkhede <ne...@gmail.com> wrote:

> Hi Joe,
> 
> The SBT upgrade patch broke the behavior of unit tests and I'm not sure how
> to proceed here. If unit tests fail, sbt hides the stack traces now, which
> is good. But what is the command that can print those per test ?
> 
> Thanks,
> Neha