Skip to content
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

adjustments to run in .NET Framework, adding job to run tests for .NET Framework #91

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

slorello89
Copy link
Member

Needed to make a couple updates to get this to work with .NET Framework

  1. Array.Fill doesn't exist in .NET Framework - so needed to replicate the behavior
  2. Random.NextInt64 doesn't exist in .NET Framework - I squeezed it into a simple Random.Next (which produces an in32 instead of an int64) - if an Int64 is really needed - we can do that (would just need to produce 2 Int32s and do a bit shift and bitwise or)
  3. Casting "nan" to a double apparently doesn't work outside of .NET Core, trying to do so will result in a weird casting exception - fundamentally caused by System.Format not checking for nan This might be something to take upstream to StackExchange.Redis - but I cannot think of a non-module command that returns a nan so IMO it is, for the moment, something best managed by the derived library.
  4. The MADD tests were adding the same timestamp over and over without setting a proper duplication policy - you might have a better sense as to why this would have worked at all, but I made the adjustment to set them right by sending a non NO_DUPLICATE duplication policy.

@slorello89 slorello89 requested a review from shacharPash March 13, 2023 12:49
@shacharPash shacharPash merged commit a4fcf10 into redis:Target2.0 Mar 13, 2023
shacharPash added a commit that referenced this pull request Mar 15, 2023
* Target .NET Standard 2.0

* add condition

* update to the latest version of System.Text.Json

* adjustments to run in .NET Framework, adding job to run tests for .NET Framework

* adjustments to run in .NET Framework, adding job to run tests for .NET Framework (#91)

* syntax fix

* trying to manually switch to linux containers

* trying other format

* fixing syntax

* swapping flags

* nixing windows job

* try dropping framework restrictions

* dropping 462

* trying to test on windows using WSL 2

* adding curl install

* also installing gpg. . .

* and lsb-release...

* trying to log start

* switching to ubuntu

* change test name

* delete distribution: Ubuntu-20.04 line

* experiment

* trying with direct tar download

* ok let's actually add it this time

* resetting as a jammy instance, adding a ls for debugging

* removing mv

* removing process spinoff

* fixing syntax

* libgomp1?

* spin off again

* trying a new tact for spinning off process

* old school spin off?

* renaming

* versioning

* newline

* PS variable access

* reverting

* other means of seeding env vars?

* add sleep to HSETandSearch test

* add sleep to TestQueryCommandBuilderScore Test

* conditional framework usage based on platform

---------

Co-authored-by: slorello89 <slorello89@gmail.com>
Co-authored-by: Steve Lorello <42971704+slorello89@users.noreply.github.com>
Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
Co-authored-by: slorello89 <steve.lorello@redis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants