Skip to content

Reopening issue #72, with variation of failing scenario still broken in 3.0.1 #93

Closed
@cpotter1

Description

@cpotter1
//  @Ignore // still broken as of 3.0.1
  @Test
  public void orderByOnNullableColumn2() {
    NitriteCollection coll = db.getCollection("orderByOnNullableColumn2");
//    try {
//      coll.createIndex("startTime", IndexOptions.indexOptions(IndexType.NonUnique));
//    } catch (IndexingException e) {
//      // ignore
//    }

    coll.remove(Filters.ALL);

    Document doc = new Document().put("id", "test-2").put("group", "groupA");
    assertEquals(1, coll.insert(doc).getAffectedCount());

    doc = new Document().put("id", "test-1").put("group", "groupA");
    assertEquals(1, coll.insert(doc).getAffectedCount());

    Cursor cursor = coll.find(Filters.eq("group", "groupA"), FindOptions.sort("startTime", SortOrder.Descending));
    assertEquals(2, cursor.size());
  }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions