Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
w1am committed Jan 7, 2025
1 parent f68cec0 commit d37bc7c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 25 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@ on:
required: false
type: string
default: eventstore-ce/eventstoredb-ce
# test:
# required: true
# type: string

jobs:
test:
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
framework: [ net9.0 ]
framework: [ net8.0, net9.0 ]
os: [ ubuntu-latest ]
configuration: [ release ]
runs-on: ${{ matrix.os }}
# name: ${{ inputs.test }} (${{ matrix.os }}, ${{ matrix.framework }})
name: (${{ matrix.os }}, ${{ matrix.framework }})
env:
CLOUDSMITH_CICD_USER: ${{ secrets.CLOUDSMITH_CICD_USER }}
Expand Down Expand Up @@ -66,10 +62,3 @@ jobs:
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/Kurrent.Client.Tests
# run: |
# sudo ./gencert.sh
# dotnet test --configuration ${{ matrix.configuration }} --blame \
# --logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
# --framework ${{ matrix.framework }} \
# test/EventStore.Client.${{ inputs.test }}.Tests
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ jobs:
strategy:
fail-fast: false
matrix:
# docker-tag: [ ci, lts, previous-lts ]
docker-tag: [ ci ]
# test: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement ]
docker-tag: [ ci, lts, previous-lts ]
name: Test CE (${{ matrix.docker-tag }})
with:
docker-tag: ${{ matrix.docker-tag }}
docker-image: eventstore-ce/eventstoredb-ce
# test: ${{ matrix.test }}
# ee:
# uses: ./.github/workflows/base.yml
# if: ${{ github.repository_owner == 'EventStore' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public async Task InitializeAsync() {
await ContainerSemaphore.WaitAsync();
try {
await Service.Start();
EventStoreVersion = GetEventStoreVersion();
EventStoreVersion = GetKurrentVersion();
EventStoreHasLastStreamPosition = (EventStoreVersion?.Major ?? int.MaxValue) >= 21;
// EventStoreHasLastStreamPosition = true;
} finally {
Expand Down Expand Up @@ -133,7 +133,7 @@ async Task<T> InitClient<T>(Func<T, Task> action, bool execute = true) where T :
return client;
}

static Version GetEventStoreVersion() {
static Version GetKurrentVersion() {
const string versionPrefix = "EventStoreDB version";

using var cancellator = new CancellationTokenSource(FromSeconds(30));
Expand All @@ -146,8 +146,7 @@ static Version GetEventStoreVersion() {

using var log = eventstore.Logs(true, cancellator.Token);
foreach (var line in log.ReadToEnd()) {
Logger.Warning("line---> {line}", line);

Logger.Information("EventStoreDB: {Line}", line);
if (line.StartsWith(versionPrefix) &&
Version.TryParse(
new string(ReadVersion(line[(versionPrefix.Length + 1)..]).ToArray()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async Task<int> GetNextAvailablePort(TimeSpan delay = default) {
#if NET
if (socket.Connected) await socket.DisconnectAsync(true);
#else
if (socket.Connected) socket.Disconnect(true);
if (socket.Connected) socket.Disconnect(true);
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public async Task InitializeAsync() {
await ContainerSemaphore.WaitAsync();
try {
await Service.Start();
EventStoreVersion = GetEventStoreVersion();
EventStoreVersion = GetKurrentVersion();
EventStoreHasLastStreamPosition = (EventStoreVersion?.Major ?? int.MaxValue) >= 21;
// EventStoreHasLastStreamPosition = true;
} finally {
Expand Down Expand Up @@ -135,7 +135,7 @@ async Task<T> InitClient<T>(Func<T, Task> action, bool execute = true) where T :
return client;
}

static Version GetEventStoreVersion() {
static Version GetKurrentVersion() {
const string versionPrefix = "EventStoreDB version";

using var cancellator = new CancellationTokenSource(FromSeconds(30));
Expand All @@ -148,8 +148,7 @@ static Version GetEventStoreVersion() {

using var log = eventstore.Logs(true, cancellator.Token);
foreach (var line in log.ReadToEnd()) {
Logger.Warning("line---> {line}", line);

Logger.Information("EventStoreDB: {Line}", line);
if (line.StartsWith(versionPrefix) &&
Version.TryParse(
new string(ReadVersion(line[(versionPrefix.Length + 1)..]).ToArray()),
Expand Down

0 comments on commit d37bc7c

Please sign in to comment.