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

Rick Hillegas commented on DERBY-6539:
--------------------------------------

I have reproduced this error on a windows machine where it failed during the 
nightly tests. I am able to reproduce the problem with a smaller test script, 
which shows that the Lucene query returns different score values on this 
platform than on the other platforms where the test succeeds. Here is the 
simpler test script:

{noformat}
connect 'jdbc:derby:db1;create=true;user=test_dbo';

call syscs_util.syscs_create_user( 'TEST_DBO', 'test_dbopassword' );
call syscs_util.syscs_create_user( 'RUTH', 'ruthpassword' );

-- shutdown in order to enable NATIVE authentication
connect 'jdbc:derby:db1;shutdown=true';

connect 'jdbc:derby:db1;user=test_dbo;password=test_dbopassword' as dbo;

connect 'jdbc:derby:db1;user=ruth;password=ruthpassword' as ruth;

create table poems
(
    poemID int,
    versionStamp int not null,
    originalAuthor       varchar( 50 ),
    lastEditor           varchar( 50 ),
    poemText            clob,
    constraint poemsKey primary key( poemID, versionStamp )
);

insert into poems values
(
    1,
    1,
    'Geoffrey Chaucer',
    'Geoffrey Chaucer',
    'Whan that Aprill, with his shoures soote The droghte of March hath perced 
to the roote And bathed every veyne in swich licour, Of which vertu engendred 
is the flour;'
),
(
    2,
    2,
    'Andrew Marvell',
    'Andrew Marvell',
    'Had we but world enough, and time, This coyness, lady, were no crime.'
),
(
    3,
    3,
    'John Milton',
    'John Milton',
    'From morn to noon he fell, from noon to dewy eve, a summers day, and with 
the setting sun dropped from the zenith like a falling star on Lemnos, the 
Aegean isle.'
),
(
    4,
    4,
    'Lord Byron',
    'Lord Byron',
    'The Assyrian came down like the wolf on the fold, And his cohorts were 
gleaming in purple and gold; And the sheen of their spears was like stars on 
the sea, When the blue wave rolls nightly on deep Galilee.'
),
(
    5,
    5,
    'Walt Whitman',
    'Walt Whitman',
    'When lilacs last in the dooryard bloomd, And the great star early droopd 
in the western sky in the night, I mournd, and yet shall mourn with 
ever-returning spring.'
)
;

set connection dbo;

call syscs_util.syscs_register_tool( 'luceneSupport', true );

set connection ruth;

call LuceneSupport.createIndex( 'ruth', 'poems', 'poemText', null );

select * from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) 
luceneResults order by poemID;
{noformat}

On Mac OSX, the final query returns this result:

{noformat}
POEMID     |VERSIONSTA&|DOCUMENTID |SCORE          
---------------------------------------------------
3          |3          |2          |0.22933942     
4          |4          |3          |0.22933942     
5          |5          |4          |0.26756266     
{noformat}

…but the final query returns this result on the failing platform:

{noformat}
POEMID     |VERSIONSTA&|DOCUMENTID |SCORE          
---------------------------------------------------
3          |3          |2          |0.19111618
4          |4          |3          |0.19111618
5          |5          |4          |0.19111618
{noformat}


> Wrong rank value in LuceneSupportTest and LuceneSupportPermsTest
> ----------------------------------------------------------------
>
>                 Key: DERBY-6539
>                 URL: https://issues.apache.org/jira/browse/DERBY-6539
>             Project: Derby
>          Issue Type: Bug
>          Components: Test, Tools
>         Environment: windows_amd64_jdk6
>            Reporter: Rick Hillegas
>
> See http://download.java.net/javadesktop/derby/request_5589457/. The tests 
> passed cleanly on the same platform with Java 7 and Java 8 but there are 
> diffs on Java 6. The first error in LuceneSupportTest has this stack trace:
> {noformat}
>     junit.framework.AssertionFailedError: Column value mismatch @ column 
> 'RANK', row 1:
>     Expected: >0.8048013<
>     Found:    >0.643841<
>       at 
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1303)
>       at 
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1215)
>       at 
> org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.java:1102)
>       at 
> org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1025)
>       at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:982)
>       at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:940)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportTest.testCreateAndQueryIndex(LuceneSupportTest.java:72)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:457)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
> {noformat}
> The first error in LuceneSupportPermsTest has this stack trace:
> {noformat}
>     junit.framework.ComparisonFailure: expected:<0.[22933942]> but 
> was:<0.[19111618]>
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.assertResults(BaseJDBCTestCase.java:1741)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.assertResults(BaseJDBCTestCase.java:1705)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportPermsTest.test_001_basicNoGrant(LuceneSupportPermsTest.java:197)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:457)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to