Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failed during vagrant up #17

Closed
brainstorm opened this issue Jul 1, 2014 · 2 comments
Closed

Test failed during vagrant up #17

brainstorm opened this issue Jul 1, 2014 · 2 comments

Comments

@brainstorm
Copy link

Running edu.harvard.iq.dataverse.util.JsfHelperTest
enumValue
Jul 01, 2014 12:19:24 AM edu.harvard.iq.dataverse.util.JsfHelper enumValue
WARNING: Illegal value for enum edu.harvard.iq.dataverse.util.JsfHelperTest$TestEnum: 'THIS IS A BAD VALUE'
@pdurbin
Copy link
Member

pdurbin commented Jul 1, 2014

Technically, this is only a warning. Here's the full test output on my machine (Failures: 0):

Running edu.harvard.iq.dataverse.util.JsfHelperTest
enumValue
Jul 01, 2014 9:27:39 AM edu.harvard.iq.dataverse.util.JsfHelper enumValue
WARNING: Illegal value for enum edu.harvard.iq.dataverse.util.JsfHelperTest$TestEnum: 'THIS IS A BAD VALUE'
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec

I do agree it's a little confusing. @michbarsinai can you please take a look?

@pdurbin
Copy link
Member

pdurbin commented Jul 7, 2014

I spoke with @michbarsinai last week and he explained the printing of the warning is by design.

logger.log(Level.WARNING, "Illegal value for enum {0}: ''{1}''", new Object[]{enmClass.getName(), param});
says

logger.log(Level.WARNING, "Illegal value for enum {0}: ''{1}''", new Object[]{enmClass.getName(), param});

The bad value is passed in at

assertEquals( TestEnum.Dolor, instance.enumValue("THIS IS A BAD VALUE", TestEnum.class, TestEnum.Dolor) );
as

assertEquals( TestEnum.Dolor, instance.enumValue("THIS IS A BAD VALUE", TestEnum.class, TestEnum.Dolor) );

In short, JsfHelper.java is supposed to log a warning.

@pdurbin pdurbin closed this as completed Jul 7, 2014
Jian881219 added a commit to Jian881219/dataverse that referenced this issue Sep 18, 2014
mheppler pushed a commit that referenced this issue Nov 28, 2018
kcondon pushed a commit that referenced this issue May 17, 2019
lionick pushed a commit to lionick/dataverse that referenced this issue Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants