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
CSHARP-4420: EG tests for Atlas Search #1001
Changes from 1 commit
facf8a1
0c9e2a6
7bcf7c3
bd3bb51
332b09a
ad74cdf
ff4c396
cae2582
20bc1eb
40b011d
0daabd7
4d81692
43d8939
5ce4903
cc9a895
586b2cc
f159956
454f37c
b3ca622
cb8a4be
150dd8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o xtrace | ||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
############################################ | ||
# Main Program # | ||
############################################ | ||
|
||
echo "Running Atlas Search driver tests" | ||
|
||
export ATLAS_SEARCH_TESTS_ENABLED=true | ||
|
||
powershell.exe .\\build.ps1 --target TestAtlasSearch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we have plans for non windows envs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choice for Windows platform is arbitrary, but we don't plan to extend to other OS. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it, I wrote it for 2 reasons:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's fine for now, just copied from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. James told me once that we had to use I.e. that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's mandatory only on non windows OSs if I recall correctly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At one point it was mandatory on my Windows machine also, so I got used to using the My guess is that at some point a Cake release made it mandatory, and they got lots of complaints, and then they reverted the change. I'm assuming it's Cake that parses this argument(s) and not Powershell. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// Copyright 2010-present MongoDB Inc. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copyright has a bit different commenting format, see other files There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, I'll fix this in the main search PR too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure whether it's already should be fixed, but if so - not fixed yet There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for the future :( I would suggest using a different PR approach (we already did similar work in past) since it's hard to follow what was fixed and what should be reviewed. Sounds like at least in this file the above suggestion was applied.. |
||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using MongoDB.Bson; | ||
using MongoDB.Bson.Serialization.Attributes; | ||
|
||
namespace MongoDB.Driver.Search | ||
{ | ||
/// <summary> | ||
/// Represents a result of highlighting. | ||
/// </summary> | ||
public sealed class Highlight | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this new file in this PR? Shouldn't all work that is not testing related be in the CSHARP-4440 PR? In any case, I'm not reviewing this file in this PR because it's not testing related. This whole folder is wildly out of date with CSHRP-4440. |
||
{ | ||
/// <summary> | ||
/// Gets or sets the document field which returned a match. | ||
/// </summary> | ||
[BsonElement("path")] | ||
public string Path { get; private set; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds like it's for deserialization only. Does it deserve a comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it's for deserialization. Looks pretty minor for a comment. |
||
|
||
/// <summary> | ||
/// Gets or sets one or more objects containing the matching text and the surrounding text | ||
/// (if any). | ||
/// </summary> | ||
[BsonElement("texts")] | ||
public HighlightText[] Texts { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the score assigned to this result. | ||
/// </summary> | ||
[BsonElement("score")] | ||
public double Score { get; private set; } | ||
} | ||
|
||
/// <summary> | ||
/// Represents the matching text or the surrounding text of a highlighting result. | ||
/// </summary> | ||
public class HighlightText | ||
{ | ||
/// <summary> | ||
/// Gets or sets the text from the field which returned a match. | ||
/// </summary> | ||
[BsonElement("value")] | ||
public string Value { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the type of text, matching or surrounding. | ||
/// </summary> | ||
[BsonElement("type")] | ||
[BsonRepresentation(BsonType.String)] | ||
public HighlightTextType Type { get; private set; } | ||
} | ||
|
||
/// <summary> | ||
/// Represents the type of text in a highlighting result, matching or surrounding. | ||
/// </summary> | ||
public enum HighlightTextType | ||
{ | ||
/// <summary> | ||
/// Indicates that the text contains a match. | ||
/// </summary> | ||
Hit, | ||
|
||
/// <summary> | ||
/// Indicates that the text contains the text content adjacent to a matching string. | ||
/// </summary> | ||
Text | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a section like in most of other files about output variables: https://github.com/mongodb/mongo-csharp-driver/blob/master/evergreen/run-csfle-azure-tests.sh#L11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.