Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
onelxj committed Jun 27, 2023
1 parent fa959e4 commit 3ad34ee
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 9 deletions.
45 changes: 42 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- os: ubuntu-latest
sudo-command: "sudo"
bazel-command: "dazel"
bazel-config: "--config=asan"
bazel-config: "--config=asan --test_env=ASAN_OPTIONS=detect_odr_violation=0"
output-user_root: ""
- os: windows-2019
sudo-command: "" # The Windows runner already runs as root.
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
--google_credentials=${{ env.GOOGLE_APPLICATION_CREDENTIALS }}" \
>> $GITHUB_ENV
- name: Build
- name: Build eventuals
run: |
${{ matrix.bazel-command }} \
${{ matrix.output-user_root }} \
Expand All @@ -118,7 +118,46 @@ jobs:
--verbose_failures \
-c dbg \
--strip="never" \
...
test:eventuals
- name: Build eventuals grpc
if: runner.os != 'Windows'
run: |
${{ matrix.bazel-command }} \
${{ matrix.output-user_root }} \
build \
${{ matrix.bazel-config }} \
${{ env.BAZEL_REMOTE_CACHE }} \
--verbose_failures \
-c dbg \
--strip="never" \
test/grpc:grpc
- name: Build route-guide
if: runner.os != 'Windows'
run: |
${{ matrix.bazel-command }} \
${{ matrix.output-user_root }} \
build \
${{ matrix.bazel-config }} \
${{ env.BAZEL_REMOTE_CACHE }} \
--verbose_failures \
-c dbg \
--strip="never" \
test/grpc/route_guide:route-guide-test
- name: Build eventuals protobuf
if: runner.os != 'Windows'
run: |
${{ matrix.bazel-command }} \
${{ matrix.output-user_root }} \
build \
${{ matrix.bazel-config }} \
${{ env.BAZEL_REMOTE_CACHE }} \
--verbose_failures \
-c dbg \
--strip="never" \
test/protobuf:protobuf
- name: Test
run: |
Expand Down
1 change: 1 addition & 0 deletions eventuals/then.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ struct _Then final {
"callable passed to 'Then' is not invocable "
"with the type of argument it receives");


return Continuation<K, F_, Arg>(std::move(k), std::move(f_));
}

Expand Down
16 changes: 10 additions & 6 deletions test/grpc/streaming/streaming.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "streaming.h"

#include "eventuals/task.h"

namespace eventuals::grpc::test {

using keyvaluestore::Request;
Expand Down Expand Up @@ -66,12 +68,14 @@ void test_client_behavior(
::grpc::InsecureChannelCredentials(),
pool.Borrow());

auto call = [&]() {
return client.Call<
Stream<Request>,
Stream<Response>>(
"keyvaluestore.KeyValueStore.GetValues")
>> std::move(handler);
auto call = [&]() -> Task::Of<::grpc::Status>::Raises<RuntimeError> {
return [&]() {
return client.Call<
Stream<Request>,
Stream<Response>>(
"keyvaluestore.KeyValueStore.GetValues")
>> std::move(handler);
};
};

auto status = *call();
Expand Down

0 comments on commit 3ad34ee

Please sign in to comment.