Skip to content

Commit

Permalink
Merge #490 #504
Browse files Browse the repository at this point in the history
490: Add Total tasks in task route r=brunoocasali a=kashifsoofi

# Pull Request

## Related issue
Fixes #462 

## What does this PR do?
- Added Total Tasks in task route

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


504: Bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 r=brunoocasali a=dependabot[bot]

Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.3 to 2.5.4.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/b9eacec401591bf17d5a3a5436223045c980562e"><code>b9eacec</code></a> v2.5.4</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/316c225a721e952c98ee36fbd722c2859ff3847e"><code>316c225</code></a> Latest dependencies</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/9d3aaa076f1c5596dd5aed68941aef6ca9657c55"><code>9d3aaa0</code></a> Latest dependencies</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/da1033b99db9ae1debee355466a031081540dd78"><code>da1033b</code></a> Latest dependencies</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/8b760896810eb16a3a55c30a3ee63739ff84a1eb"><code>8b76089</code></a> Remove unnecessary global.json</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/af8f8dfd4ffc32c25a81c2dd3e427658f4c63696"><code>af8f8df</code></a> Sort Directory.Build.props</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/44114d063aae1b4c40d7dd64e378d4151f17f949"><code>44114d0</code></a> Disable MSBuild transitive copies</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/48b0558eadbee6b79379b2ad988ab5940882ef27"><code>48b0558</code></a> Latest dependencies</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/2b7d93036611a5026efe1b5cb90df7290a396f0b"><code>2b7d930</code></a> Updated README</li>
<li><a href="https://github.com/xunit/visualstudio.xunit/commit/097b60584fb932d3dcff297de827c543c879c7f4"><code>097b605</code></a> Move load failure messages from DiaSession and friends to internal diagnostic...</li>
<li>Additional commits viewable in <a href="https://github.com/xunit/visualstudio.xunit/compare/2.5.3...2.5.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=xunit.runner.visualstudio&package-manager=nuget&previous-version=2.5.3&new-version=2.5.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: Kashif Soofi <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 15, 2023
3 parents ffe0303 + 08c6d5f + 6bc3c79 commit 5c87b3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Meilisearch/TasksResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ namespace Meilisearch
/// <typeparam name="T">Type of the Meilisearch server object. Ex: keys, indexes, ...</typeparam>
public class TasksResults<T> : Result<T>
{
public TasksResults(T results, int? limit, int? from, int? next)
public TasksResults(T results, int? limit, int? from, int? next, int? total)
: base(results, limit)
{
From = from;
Next = next;
Total = total;
}

/// <summary>
Expand All @@ -25,5 +26,10 @@ public TasksResults(T results, int? limit, int? from, int? next)
/// Gets next size.
/// </summary>
public int? Next { get; }

/// <summary>
/// Gets total number of tasks.
/// </summary>
public int? Total { get; }
}
}
2 changes: 1 addition & 1 deletion tests/Meilisearch.Tests/Meilisearch.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions tests/Meilisearch.Tests/TaskInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public async Task GetMultipleTaskInfoWithQueryParameters()
var taskResponse = await _index.GetTasksAsync(new TasksQuery { Limit = 1, IndexUids = new List<string> { _index.Uid } });

taskResponse.Results.Count().Should().BeGreaterOrEqualTo(1);
taskResponse.Total.Should().BeGreaterThan(0);
}

[Fact]
Expand Down

0 comments on commit 5c87b3d

Please sign in to comment.